| 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 bash.
 | 
| 8 | 
 | 
| 9 |     osh -c 'echo hi'
 | 
| 10 |     osh myscript.sh
 | 
| 11 |     echo 'echo hi' | osh
 | 
| 12 | 
 | 
| 13 | It also has a few enhancements:
 | 
| 14 | 
 | 
| 15 |     osh -n -c 'hello'                    # pretty-print the AST
 | 
| 16 |     osh --ast-format text -n -c 'hello'  # print it full
 | 
| 17 | 
 | 
| 18 | osh accepts POSIX sh flags, with these additions:
 | 
| 19 | 
 | 
| 20 |     -n             parse the program but don't execute it.  Print the AST.
 | 
| 21 |     --ast-format   what format the AST should be in
 |