Mar 23, 2004 #1 stevof Technical User Jun 22, 2003 31 CZ hi, i've got a file which consists of <number1><number2>string <number3><number4>string . . . how can i create a new file where both of numbers'll be decreased by 500? <number1-500><number2-500>string <number3-500><number4-500>string . . . thanx a lot!
hi, i've got a file which consists of <number1><number2>string <number3><number4>string . . . how can i create a new file where both of numbers'll be decreased by 500? <number1-500><number2-500>string <number3-500><number4-500>string . . . thanx a lot!
Mar 23, 2004 #2 Salem Programmer Apr 29, 2003 2,455 GB Try this Code: awk '{ $1 = $1 - 500 ; $2 = $2 - 500 ; print }' file -- Upvote 0 Downvote
Mar 23, 2004 #3 PHV MIS Nov 8, 2002 53,708 FR Try something like this: nawk -F'[<>]' ' {print "<"$2-500"><"$4-500">"$5} ' /path/to/file Hope This Help, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 Upvote 0 Downvote
Try something like this: nawk -F'[<>]' ' {print "<"$2-500"><"$4-500">"$5} ' /path/to/file Hope This Help, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884