Formating text using "cut" commond [message #97009] |
Mon, 22 October 2001 10:02 |
Laxsun
Messages: 10 Registered: October 2001
|
Junior Member |
|
|
Some can please help me, how to insert a 'tab' or some
spaces between the selecte set of characters using the cut command in unix
I am using the following command:
cut -c 1-19,30-39,51-59,71-79,91-99 test.txt
Thanks in advance
Laxsun
----------------------------------------------------------------------
|
|
|
Re: Formating text using "cut" commond [message #97010 is a reply to message #97009] |
Tue, 23 October 2001 05:38 |
Dinesh C Sivasankaran
Messages: 2 Registered: October 2001
|
Junior Member |
|
|
You can try something like this ...
$ cat i
1223456767
2323456767
$ awk '{printf "%st%sn",substr($0,0,3), substr($0,4,3)}' i | more
122 345
232 345
You can change the tab (t) with other suitable delimiters you want.
Hope this would be useful .
----------------------------------------------------------------------
|
|
|
|