Search Results

Search: Posts Made By: soleil4716
5,694
Posted By soleil4716
Try using 'gawk' instead of 'awk' if you have it...
Try using 'gawk' instead of 'awk' if you have it available on your system and see if that fixes the problem or not. I think 'awk' has some limitation with record lengths.
5,694
Posted By soleil4716
host1> head -1 file1 > outfile host1> sed...
host1> head -1 file1 > outfile
host1> sed '1d;$d' file1|sed '$d'|awk '{print substr($0, 1, 8); print substr($0, 9, 7)}' >> outfile
host1> tail -2 file1 >> outfile
host1> cat outfile
header...
5,694
Posted By soleil4716
Another option is to use sed and awk. Assuming,...
Another option is to use sed and awk. Assuming, file1 content is like the
following:


host1> cat file1
header
summary1detail1
summary2detail2
summary3detail3
trailer1
trailer2


You can...
Showing results 1 to 3 of 3

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