Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GAH! Bash script insanity



Joshua Pollak <pardsbane at offthehill.org> writes:

> Ok, I'm going crazy. I don't know how the script-kiddies deal with bash.
>
> So the advice I got from the list re: my awk problem was great, and
> I'm trying to implement it. Here is what I want to run:
>
> sed -e s/#.*// ${CONFIG_FILE} | awk -F"=" '/${PARAMETER}/ { print $2 }'

Try this:

  sed -e 's/#.*//' ${CONFIG_FILE} | awk -F"=" "/${PARAMETER}/ \{ print \$2 \}"

I'm not 100% sure if you need to quote the braces at the end.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org