Skip to main content
7 events
when toggle format what by license comment
Jul 3, 2015 at 15:18 history edited jofel CC BY-SA 3.0
answer shortened
Jul 3, 2015 at 15:18 comment added jofel @don_crissti yes your are correct, it does not make sense, I removed it.
Jul 3, 2015 at 14:30 comment added don_crissti Errhh... I was talking about passing multiple file names to a single sed invocation; that looks like some complex code that spawns a shell which runs cat, echo & sed for each file - but then, if you're processing each file separately (that is, one sed per file) you can simply do -exec sed -e 'blah-blah' -e '$a\\' {} \; (which is exactly what OP does but with a single gnu sed invocation)
Jul 3, 2015 at 14:04 comment added jofel @don_crissti I added a possiblity with xargs for many files.
Jul 3, 2015 at 14:03 history edited jofel CC BY-SA 3.0
answer extended
Jul 3, 2015 at 13:21 comment added don_crissti This is becoming rather inconvenient with many file names (as mentioned here) or even complex if the list of files is passed to sed via xargs/find...
Jul 3, 2015 at 11:52 history answered jofel CC BY-SA 3.0