[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] bash programming question...
- Subject: [ale] bash programming question...
- From: flowe at innoverse.com (Cleveland Flowe)
- Date: Wed, 18 Jul 2001 14:03:57 -0400
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.