Search Results

Search: Posts Made By: fnwine1500
2,832
Posted By fnwine1500
I couldn't get either suggestion to work. But...
I couldn't get either suggestion to work. But this seems to work

awk '{sub(substr($0,26,10)," ",$0);print}' ORIGINAL_FILE.dat > NEWFILE.dat

The " " actually has 10 spaces in between...
2,832
Posted By fnwine1500
That worked but this is how I coded it to make...
That worked but this is how I coded it to make sure every line was changed:

awk '{sub(substr($0,26,10)," ",$0);print}' ORIGINAL_FILE.dat > NEWFILE.dat


Thank you very much!
2,832
Posted By fnwine1500
How do I replace a string in file that is in a certain position with spaces?
I am trying to replace the string in position 26 through 35 of the data file with 10 spaces and I want the remaining file to stay as is, the record length is over 900 characters? I am trying to use...
Showing results 1 to 3 of 3

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