then do this,
sed 's/\([0-9]*\) \([0-9]*\) \([0-9]*\)/\1/' file1 > tmp
Explanation : I have used TRE (tagged regular expression) to remember the patterns and replaced them with a first group value through "\1".This way we can have up to "\9" values. The result file is put to a "tmp" file.
Note : Here after I would replace "Explanation" with "Exp" to minimize my effort.
No comments:
Post a Comment