I have to read each line and see at 356 character position whethere there is a word "W" in it. If it is their then don't delete the line otherwise delete it.
There are two lines as one Header and one trailer which should remain same.
Can somebody help on how to achieve by ksh script or any other way
rdrtx1 and I both understood this to mean that there were two header ilnes and one trailer line. If there is just one header line, change NR<3; in rdtx1's script to NR<2; or NR==1; .
If you are trying this on a Solaris/SunOS system, use /usr/xpg4/bin/awk , /usr/xpg6/bin/awk , on nawk instead of awk .