![]() |
Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
A developer nor a programmer am I, but I enjoy following these conversations. One of my friends is a programmer, and once you guys had thoroughly confused me with your shell-scripting trickery I bounced the original problem/question over to him for some clarification. In his response to me he states that his solution should work, or he will eat a hat. I would take great pleasure in seeing him eat a hat, so here I submit his solution (with his permission) for your collective consideration. ++++++++ The real answer to this is: "Write a freaking Perl script to do this, you idiot". Having a bash environment variable be set by piping a sed script to an awk script is just sooooo eighties... Anyway, if he really wants to do this. I can surmise that he has a config file with lines of the form: param=value And his little bash assignment will look in that config file for a certain param (separating out comment lines, of course) and stick the 'value' into the environment variable result. SO...provided that is what this guy is intending to do, I will eat my hat if this doesn't work on a properly configured system in a bash shell: RESULT=`sed -e s/#.*// $CONFIG_FILE | awk -F= '/'$PARAM'/ { print $2 }'` Let me know if it doesn't....but also let him know that he should use Perl. +++++++++ Thanks, and later. STL -----Original Message----- From: discuss-admin at blu.org [mailto:discuss-admin at blu.org] On Behalf Of D.E. Chadbourne Sent: Thursday, January 29, 2004 9:21 AM To: BLU Subject: no habla bash muy bien... -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hi. wow, i've been trying to follow the thread about shell scripts, but damn you folks are getting over my head. i know some basics from just reading a man and screwing around. does anybody know of a good read (preferably free online) that can help me learn more? thanks. eric. - -- http://235u.home.comcast.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFAGRazLlZzXRl+JnERAjKCAKDiagbxRWnObCt66UrFo4xU+GVWuQCgtZuV SQ+xrJScZF+UFhGZCWYSc/8= =WaEi -----END PGP SIGNATURE----- _______________________________________________ Discuss mailing list Discuss at blu.org http://www.blu.org/mailman/listinfo/discuss
![]() |
|
BLU is a member of BostonUserGroups | |
We also thank MIT for the use of their facilities. |