-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
24 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
# Compile a script without a shebang | ||
|
||
The script must have a supported file extension. | ||
The script must have a supported file extension. For example, | ||
|
||
```bash | ||
# use sh in PATH as interpreter | ||
../../ssc test.sh binary | ||
# use bash in PATH as interpreter | ||
../../ssc test.bash binary | ||
# use python in PATH as interpreter | ||
../../ssc test.py binary | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Compile a script with a shebang | ||
|
||
File extension is not required. | ||
File extension is not required if a shebang is present. | ||
|
||
Free to use any commands in shebang. | ||
|
||
```bash | ||
# shebang is required if no file extension | ||
../../ssc test binary | ||
# it's ok to use /usr/bin/env | ||
# it's ok to use /usr/bin/env in shebang | ||
../../ssc test.py binary | ||
# free to use any shebang, even not listed as supported | ||
# use any command in shebang even it's not listed as supported | ||
../../ssc test.expect binary | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!./bash-static | ||
|
||
echo "\$@ is $@" | ||
echo "hello world" | ||
echo "bash version is $BASH_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#!./busybox sh | ||
|
||
echo "\$@ is $@" | ||
|
||
# debian busybox calls it's own applet by default, so this will call busybox version of ls | ||
# see https://unix.stackexchange.com/questions/274273/are-busybox-commands-truly-built-in | ||
ls --help | ||
ls --help 2>&1 | head -n 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!bash-static | ||
|
||
echo "\$@ is $@" | ||
echo "hello world" | ||
echo "bash version is $BASH_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters