merge pieces of file together

Posted by veilig on Super User See other posts from Super User or by veilig
Published on 2012-12-19T20:48:06Z Indexed on 2012/12/19 23:05 UTC
Read the original article Hit count: 133

Filed under:
|
|
|
|

I have a directory tree of files I need to loop through and reformat the lines. can I do this with sed with some combination of find?

for each file, I'll need to adjust the text in the file from

...
* @category Foo
* @package Bar
...

into just this (Remove the @category line, but prepend the value to the package annotation value)

...
* @package Foo/Bar
...

what is the most efficient way of doing this? its a few hundred files that will be modified.

© Super User or respective owner

Related posts about linux

Related posts about script