Clearly there are masters and there students in this community. Thanks a lot man I really appreciate the help. This script stuff mostly gets me under :). Oh and Python as well. But I am learning.
On 2014-02-12 22:43, Charles Steinkuehler wrote: > On 2/12/2014 2:33 PM, Marius Liebenberg wrote: >> Oh and dont add a CRLF after the last entry in sections.txt. Its a bug I >> dont know how to fix.//It will run but not exit until you hit cntrl C. > It's because without a filename cat reads from stdin. Try something > like the following instead, which adds support for comments and blank lines: > > while IFS= read -r name <&3; > do > case "$name" in > #*|"") continue ;; > *) cat $name >> $oname.ini ;; > esac > done 3< sections.txt > > Also, since you don't seem to be wanting to support whitespace in your > filename (cat $name instead of cat "$name") you might want to put > anything after the first whitespace on the line into a different > variable so you can have lines like: > > pre_amble.sec # Really great startup code > > ...in your sections.text file. Do this like so: > > while IFS= read -r name JUNK <&3; > > ...and you'll get: > name="pre_amble.sec" > JUNK="# Really great startup code" > > ...otherwise with your current code you'll get: > > name="pre_amble.sec # Really great startup code" > > ...which will cause problems with your cat command when it gets expanded. > > > > ------------------------------------------------------------------------------ > Android apps run on BlackBerry 10 > Introducing the new BlackBerry 10.2.1 Runtime for Android apps. > Now with support for Jelly Bean, Bluetooth, Mapview and more. > Get your Android app in front of a whole new audience. Start now. > http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk > > > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users -- Regards /Groete Marius D. Liebenberg +27 82 698 3251 +27 12 743 6064 ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
