HemaV
1
Hi All,
I'm trying to view data using cut command for a fixed length file using the below command:
cut -c 1-3,4-5 FALCON_PIS_00000000.dat
I want to mention a separator say | (pipe) in between 1-3 and 4-5.
Please let me know how to achieve this.
Thanks in Advance,
Jotne
2
Can you supply example data file and desired output?
I hope this is what you are looking for
awk '{print substr($0,1,3)"|"substr($0,4,2)}' FALCON_PIS_00000000.dat
HemaV
4
Thanks Awk command is working fine. 