play with reading many args

This commit is contained in:
Thomas Levine 2016-04-10 17:04:12 +00:00
parent 22e9f57f0f
commit a084577951
1 changed files with 8 additions and 0 deletions

8
urchin
View File

@ -226,6 +226,14 @@ plural () {
fi
}
read_many() {
if delimiter="${1}" && shift; then
while test "${#}" -gt 0; do
echo "while read -d '${delimiter}'; do"
done
fi
}
has_shebang_line() {
head -n 1 "${1}" | grep -v '^#!/bin/sh$' | grep -q '^#!'
}