>A question:
>I have several several source files which I want to process in batch,
>and I
>want to save only the final results (without saving intermediate
>file..)
>so from list /Users/.../prova1,2,3,...,6.txt save the results as
>/Users/.../provaa,b,c,d,...txt
>
>Which way could I use to automate ?
>I could export list of file to do, but how to use it in batch from the
>terminal?
>
GNU sed has an "i" option for that but a shell loop is the normal way:
$ files="foo bar baz"
> for f in $files; do
> sed {arguments} $f > $f.new &&
> mv $f.new $f
> done
In either case, when you're doing batch changes with regular expressions always create a backup copy of your files first: even if you don't think you'll need them.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.