Hi Friends,
I am using the below code in my script:
elif [ $1 != 'Cindy' -a `echo $Line | grep -ce 'Larry' -e 'Joe' -e 'Bryan' -e 'Lane'` -gt 0 ]
then
NEW_LINE=`echo $Line | awk '{sub ($4, "2010\\\/04\\\/07"); printf "# %s %9s %18s\n", $2,$3,$4}'`
sed $n" s/.*/$NEW_LINE/" kfile > tmp
mv tmp kfile
fi
Around 30 lines are replaced by this code correctly. But when it replaces 5th, 6th, 7th lines, it displaces error message as shown below:
awk: 0602-521 There is a regular expression error.
\(\) or () imbalance.
The input line number is 1.
The source line number is 1.
awk: 0602-521 There is a regular expression error.
\(\) or () imbalance.
The input line number is 1.
The source line number is 1.
awk: 0602-521 There is a regular expression error.
\(\) or () imbalance.
The input line number is 1.
The source line number is 1.
I am not sure why I receive these messages though the functionality is achived and the lines are replaced correctly in the file.
Any ideas to avoid this message will be of great help.
Thanks,
Sugan