1
0
Fork 0
mirror of https://github.com/engineer-man/piston.git synced 2025-05-01 01:16:29 +02:00

Merge pull request from Hydrazer/sql

sqlite3 add argv compitibility
This commit is contained in:
Thomas Hobson 2022-06-02 17:15:56 +12:00 committed by GitHub
commit 4614c43573
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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"