i want to create a sed script

July 24, 2011 at 02:34:35
Specs: Linux x86_64
i want to create a sed script to make changes on a text file. for example i have :

/* 1) This is a comment

with two lines */

and i want to change it so the final state to be like this :

/**

1) This is a comment

with two lines

*/

anyone can help me???


See More: i want to create a sed script

Report •


#1
July 24, 2011 at 15:14:01

sed -e 's|^\/\*|&\* \n|' -e 's|\*/$|\n&|' datafile.txt

Report •
Related Solutions


Ask Question