Skip to content

v0.7.1

Choose a tag to compare

@ryuichiueda ryuichiueda released this 29 Aug 10:42
· 2292 commits to main since this release

Enabled to read and execute shell scripts

We can use shell scripts with shebang from this version. The output with -v is also fixed as it becomes identical with that of Bash.

example

### example shell script ###
🍣 cat ~/tmp/hoge.sush 
#!/bin/sush -xv              # Change the path if necessary

echo abc

echo d\
ef

echo $LINENO

using the script with shebang

🍣 ~/tmp/hoge.sush 
#!/bin/sush -xv

echo abc
+ echo abc
abc

echo d\
ef
+ echo def
def

echo $LINENO
+ echo 8
8

using the script without shebang

🍣 sush ~/tmp/hoge.sush 
abc
def
8
🍣 sush ~/tmp/hoge.sush -xv
#!/bin/sush -xv

echo abc
+ echo abc
abc

echo d\
ef
+ echo def
def

echo $LINENO
+ echo 8
8