Article 5AF95 And close behind that, ANOTHER bad script

And close behind that, ANOTHER bad script

by
L_Carver
from LinuxQuestions.org on (#5AF95)
This script Code:#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
tref="Topless Treats""
cate=PRN
pic=0
function oliverhardy () {
echo -e "What list file will I be using?"
read -e thelist

if [[ "$thelist" =~ " " ]]; then
fg=${thelist% *}
else
fg=$thelist
fi
}

oliverhardy
while read fg
do
echo -e "Working on item '$fg' now."
exiv2 --keep -M"set Iptc.Application2.TransmissionReference $tref" -M"set Xmp.photoshop.TransmissionReference $tref" "$fg"
echo -e "TRANSMISSION REFERENCE = $tref"
exiv2 --keep -M"set Iptc.Application2.Category $cate" -M"set Xmp.photoshop.Category $cate" "$fg"
echo "CATEGORY = $cate"
pic=$[pic+1]
done<$fg
echo -e "$pic files annotated \(category PRN\) this run." returns the following errorsCode:/home/carver/bin/holyrefer/treftopl: line 28: unexpected EOF while looking for matching `"'
/home/carver/bin/holyrefer/treftopl: line 29: syntax error: unexpected end of fileAnd with line 25 changed to Code: echo "CATEGORY = $cate"...my installed ShellCheck returns Code:In /home/steve/bin/holyrefer/treftopl line 29:
^-- SC1072: Expected end of double quoted string. Fix any mentioned problems and try again.Some of this code works fine in similar scripts I've written. Why is it buggy here?

Carver
Attached Files
txt.giftreftopl.txt (681 Bytes)
latest?d=yIl2AUoC8zA latest?i=HRJMOlnjgwg:ivO_Oks52Qs:F7zBnMy latest?i=HRJMOlnjgwg:ivO_Oks52Qs:V_sGLiP latest?d=qj6IDK7rITs latest?i=HRJMOlnjgwg:ivO_Oks52Qs:gIN9vFwHRJMOlnjgwg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments