Quote variables, remove trailing whitespace
If you don't quote your variables the scripts get very buggy if you run them with arguments with spaces in them, or even run them from a directory with spaces in its path.
This commit is contained in:
1 parent
6f5130d8fd
commit
a502259ba9
4 files changed
+50
-50
No files matched your search
@@ -3,8 +3,8 @@
|
||||
# script to make sql file for inserting all "currently trusted" keys
|
||||
#
|
||||
|
||||
root=$(readlink -e $(dirname $0))
|
||||
touch $root/keys.sql
|
||||
for key in $(cat $root/keys.txt) ; do
|
||||
root=$(readlink -e "$(dirname "$0")")
|
||||
touch "$root/keys.sql"
|
||||
for key in $(cat "$root/keys.txt") ; do
|
||||
echo "insert into modprivs(pubkey, newsgroup, permission) values('$key', 'overchan', 'all');" >> keys.sql ;
|
||||
done
|
||||
Reference in new issue
Block a user