PH - your solution partially working. The prefix and suffix works
Here's the input
MTR16016002001000000000000000OA 2100670 000000000010000000100470000000NN NNE 000 E0000001
MTR16016002001000000000000000CA 909079 000000000290000002900570000000NN NNE 000...
Oops. forgot the attachment
Here's the script
#!/usr/bin/ksh
#set -x
MVRSFile=$1
MDMS_MVRS_Fileformat=$2
dateext=`date '+%Y%m%d%H%M%S'`
#echo $dateext > GoodOutput.log
#echo $dateext > BadOutput.log
while read line
do
# do somthing on each $line
# save each line in a...
Thx PHV.
I've attached the script and test file with your solution and getting an error.
awk:0602-533 Cannot find or open file MTR16016002001000000000000000OA.
I've following lines in a file and I need to suffixed with "E" to the 2nd field if the length of 2nd field is greater then 7 digits.
For Example:
MTR16016002001000000000000000OA 2100670 000000000010000000100470000000NN NNE 000 E0000001
change to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.