Plan 9 from Bell Labs’s /n/sources/contrib/rog/sh-examples/demo/namespace.demo/demo
cd dir x := ( 'ls -l' 'ls -l x1' 'ls -l x2' 'cat x1/file1' 'cat x2/file3' 'bind -b x2 x1' 'ls -l x1' 'cat x1/file1' 'cat x1/file2' 'cat x1/file3' '# exit' ) cmds = () for (i in $x) { cmds = $cmds $i '{result = '^${quote $i}^'}' } #label := cmd := () #while {! ~ $#cmds 0} { # (cmd label x) = $x # cmds = $cmds $label '{result = '^${quote $cmd}^'}' #} dodemo $cmds
(This is a user-contributed directory and should not be interpreted as statement by Alcatel-Lucent.)