Compare commits

..

2 Commits

Author SHA1 Message Date
Thomas Hobson 4614c43573
Merge pull request #482 from Hydrazer/sql
sqlite3 add argv compitibility
2022-06-02 17:15:56 +12:00
Hydrazer 86ff6b74a7 sqlite3 add argv compitibility 2022-06-01 16:52:35 -06:00
1 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,19 @@
#!/bin/bash #!/bin/bash
sqlite3 < "$1" code=`cat "$1"`
shift
argv_text=""
for arg in "$@"
do
argv_text+='insert into argv (arg) values ("'"`echo "$arg" | sed 's/"/""/g'`"'");
'
done
sqlite3 <<< "create table argv (arg text);
$argv_text
$code"