|ddd0808||Date: Friday, 2014-12-26, 10:49 AM | Message # 1|
|Hello , |
pls let me know this:
To insert a new column (say serial number) before the 1st column and to insert a new column after the last column..
Please let me know these...
|shanky||Date: Friday, 2014-12-26, 3:06 PM | Message # 2|
|Hello ddd0808, |
To insert a serial number before the first column, you can use sed tool itself.
#>sed '/./=' filename|sed 'N;s/\n/ /'
The above command will put numbering 1,2,3.. in front of each line.
To insert a new cloumn after last , you can use:
shanky@localhost:> sed 'G;s/\n/ wd/' test1
1 first wd
2 second wd
3 third wd
Here, 'wd' is the word to be put in each line at last column
I hope this helps. If any issues, reach again.