| 1 | bin/osh is compatible with POSIX shell, bash, and other shells.
|
| 2 |
|
| 3 | Usage: osh FLAG* SCRIPT ARG*
|
| 4 | osh FLAG* -c COMMAND ARG*
|
| 5 | osh FLAG*
|
| 6 |
|
| 7 | The command line accepted by `bin/osh` is compatible with /bin/sh and
|
| 8 | bash.
|
| 9 |
|
| 10 | osh -c 'echo hi'
|
| 11 | osh myscript.sh
|
| 12 | echo 'echo hi' | osh
|
| 13 |
|
| 14 | It also has a few enhancements:
|
| 15 |
|
| 16 | osh -n -c 'hello' # pretty-print the AST
|
| 17 | osh --ast-format text -n -c 'hello' # print it full
|
| 18 |
|
| 19 | osh accepts POSIX sh flags, with these additions:
|
| 20 |
|
| 21 | -n parse the program but don't execute it.
|
| 22 | Print the AST.
|
| 23 | --ast-format what format the AST should be in
|