Problems editing a field

  • Thread starter Thread starter UsNixon02
  • Start date Start date
U

UsNixon02

I'm trying to build a script that will change whats in field 3 in a file to "Show". So far I'm not having too much luck piping to sed :confused:, was hoping someone might know where I'm going wrong or maybe a better idea

tput cup 22 4; echo "Move Artwork to Show"
tput cup 23 4; echo "AID: "
tput cup 23 11; read aid
tput cup 25 4; echo "Accept? (y)es
or (n)o: "
tput cup 25 27; read Accept
if test $Accept = "y"
then
grep $aid $artfile | sed -ne "s/archived/show/p" >> art_inpark ;
grep $aid $artfile | sed -ne 's/archived/show/p' >> temp ;
grep -v $aid $artfile >> temp ;
cp temp $artfile
rm temp
fi
;;

Does it matter that it's in a case logic?
Thanks in advance!

Continue reading...
 
Back
Top