Search Results

Search: Posts Made By: MadeInGermany
2,794
Posted By MadeInGermany
Substitutions at character positions are often...
Substitutions at character positions are often easier with sed
sed '/^001/ s/\(.\{4\}\)../\1 /' file
The \1 puts back what matched within the \( \) and that is the first 4 characters.
2,794
Posted By MadeInGermany
Try this (untested, try with nawk and...
Try this (untested, try with nawk and /usr/xpg4/bin/awk)
awk 'BEGIN{OFS=FS=""} (substr($0,1,3)=="001") {$5=$6=" "} {print}' a.txt
2,794
Posted By MadeInGermany
You say 001 but in your code you have 123?
You say 001 but in your code you have 123?
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 07:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy