Dear All,
Good day. I'm having problems with my KSH.
I have a text file with lines like this: (impsrc.lst)
!WK29_20070720_1109_v26
=SCMUIUSER
This is my script:
cat impsrc.lst | while read line
do
{if line contains '=' then do} <--- don't know how to do this
filez=${line##*"="}
echo "Found: "$filez
{end if}
done
exit 1
What it does is strip away the charater '=' and just prints the lines without the '='. But it also prints all the lines which start with '!'. All I want is to just print the lines starting with '=' without the '='.
I was thinking of:
1. check if line contains '='
2. if yes then print without '='
So the output should be:
SCMUIUSER
Right now I get this as output:
!WK29_20070720_1109_v26
SCMUIUSER
Thanks in advance for all the help.