Charles
I made the changes to the scripts as you suggested but I not able to ad 
the comment after the file name entry. It seems like the script does not 
read it into the JUNK variable.
Sorry to bug you with this but I am not well versed with the scripting 
stuff.

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
> Emc-users@lists.sourceforge.net
> 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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to