Quote:
Originally Posted by
aajan
HI
I Hope this script works
#!/usr/bin/ksh
while read line
do
while read value
do
grep "<delete>" |pattern=`cut -d">" -f2`
if [ $pattern == $line ]
then
sed /$pattern/d file1
sed /$pattern/d file2 |sed '/^ *$/d'
fi
done <file2
done <file1
Thanks! I'm assuming file1 and file2 are equivalent to my List1 and List2 right? So I tried running this and it gave me:
./other.sh[10]: [: argument expected
./other.sh[10]: [: argument expected
./other.sh[10]: [: argument expected
./other.sh[10]: [: argument expected
./other.sh[10]: [: argument expected
./other.sh[10]: [: argument expected
Jim
Bob
Ed
Greg
Dave
./other.sh[10]: [: argument expected
./other.sh[10]: [: argument expected
It seemed to have compiled the list right but I'm not sure of the errors. I ran the script pretty much like "./script.sh" Not sure if I was supposed to pass anything into it. Could the new list be stored in some file?