[ale] bash programming question...
Cleveland Flowe
flowe at innoverse.com
Wed Jul 18 14:03:57 EDT 2001
Christopher Bergeron wrote:
>
> Does anyone know how I can [in bash] compare each line of a text file in a
> while loop in bash? For example:
>
> a file bands.txt contains:
> Nine Inch Nails
> Stabbing Westward
> Jimmy Buffet
>
> my script, ticketmastergrepper.sh contains:
> #!/bin/bash
> wget -q -O /tmp/ticketbastard.txt http://www.ticketmaster.com
> for i in 'cat bands.txt' do
> grep $i /tmp/ticketbastard.txt
grep "$i" /tmp/ticketbastard.txt
> if [ $? -eq 0 ]
> then
> sendmail christopher at bergeron.com | echo "$i is onsale at ticketmaster!"
> fi
> done
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list