fixed printf on insert to db
This commit is contained in:
2
fetch.sh
2
fetch.sh
@@ -18,7 +18,7 @@ if [ "$1" ]; then
|
|||||||
i=1
|
i=1
|
||||||
max=$(( $(wc -l "$file" | sed 's/ .*//g') ))
|
max=$(( $(wc -l "$file" | sed 's/ .*//g') ))
|
||||||
while :; do
|
while :; do
|
||||||
printf "insert into ytlist values('$(head -n $i $file | tail -n 1 | sed "s/'/''/g" | sed "s/----/','/g" )','$2','')" | sqlite3 ./youtube_stuffs.db
|
printf -- "insert into ytlist values('%s','%s','')" "$(head -n $i $file | tail -n 1 | sed "s/'/''/g" | sed "s/----/','/g" )" "$2" | sqlite3 ./youtube_stuffs.db
|
||||||
printf "insert: $i\n"
|
printf "insert: $i\n"
|
||||||
((i=$i+1))
|
((i=$i+1))
|
||||||
if (( $i >= $max + 1 )); then
|
if (( $i >= $max + 1 )); then
|
||||||
|
|||||||
Reference in New Issue
Block a user