> I want a script that will read the file and look for the name
> "fred", and if it's found, leave the file alone, but if it's
> not found, to add the name "fred" to the bottom of the file.
No need for awk/sed. Something like this should work.
#!/bin/bash
i=`grep fred FILENAME.TXT | wc -l`
if [ $i == "0" ]
then
echo "fred" >> FILENAME.TXT
fi
>
> Any help appreciated. Thanks!
>
> --
> Kent West <")))><
> http://kentwest.blogspot.com
>
>
>
> --
> To UNSUBSCRIBE, email to [email protected]
> with a subject of "unsubscribe". Trouble? Contact
> [email protected]
> Archive: http://lists.debian.org/[email protected]
>
>
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive:
http://lists.debian.org/[email protected]