| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | echoscip-shell system . . echo. |
| 4 | |
| 5 | if testscip-shell system . . test. -z "$1" |
| 6 | then |
| 7 | echoscip-shell system . . echo. "No command-line arguments." |
| 8 | else |
| 9 | echoscip-shell system . . echo. "First command-line argument is $1." |
| 10 | fi |
| 11 | |
| 12 | echoscip-shell system . . echo. |
| 13 | |
| 14 | if /usr/bin/testscip-shell filesystem . . `/usr/bin/test`. -z "$1" # Equivalent to "test" builtin. |
| 15 | # ^^^^^^^^^^^^^ # Specifying full pathname. |
| 16 | then |
| 17 | echoscip-shell system . . echo. "No command-line arguments." |
| 18 | else |
| 19 | echoscip-shell system . . echo. "First command-line argument is $1." |
| 20 | fi |
| 21 | |
| 22 | echoscip-shell system . . echo. |
| 23 | |
| 24 | if [scip-shell system . . `[`. -z "$1" ] # Functionally identical to above code blocks. |
| 25 | # if [ -z "$1" should work, but... |
| 26 | #+ Bash responds to a missing close-bracket with an error message. |
| 27 | then |
| 28 | echoscip-shell system . . echo. "No command-line arguments." |
| 29 | else |
| 30 | echoscip-shell system . . echo. "First command-line argument is $1." |
| 31 | fi |
| 32 | |
| 33 | echoscip-shell system . . echo. |
| 34 | |
| 35 | |
| 36 | if /usr/bin/[scip-shell filesystem . . `/usr/bin/[`. -z "$1" ] # Again, functionally identical to above. |
| 37 | # if /usr/bin/[ -z "$1" # Works, but gives an error message. |
| 38 | # # Note: |
| 39 | # This has been fixed in Bash, version 3.x. |
| 40 | then |
| 41 | echoscip-shell system . . echo. "No command-line arguments." |
| 42 | else |
| 43 | echoscip-shell system . . echo. "First command-line argument is $1." |
| 44 | fi |
| 45 | |
| 46 | echoscip-shell system . . echo. |
| 47 | |
| 48 | exit 0 |