add newbash script

This commit is contained in:
Ray Elliott 2020-02-17 20:50:26 +00:00
commit 42a9aefb94
2 changed files with 15 additions and 0 deletions

14
src/newbash Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
set -e
if [ -f "$1" ] ; then
echo "Error: file exists: $1"
exit 1
fi
echo "#!/bin/bash" > "$1"
echo "" >> "$1"
echo "$2" >> "$1"
chmod u+x "$1"