Solarius wrote:

> Is there any way to replace string with another, for example from
> standard input to standard output via commandline with GNU toolbox?

This is possible with sed, awk, perl, and probably a zillion other
tools, depending on exactly what you want to do.  But none of these are
part of GNU coreutils, they are their own projects.  However, any system
that has coreutils installed will likely have at least one of them as
well.

sed -e 's,search,replace,g'
perl -pe 's,search,replace,g'
awk '{ gsub(/search/, "replace"); print }'

> I need to "parse" text from a file or input, and replace a string and
> put conclusion to output.

That's way too generic of a description to really be able to offer any
concrete advice.

> I tried to find a way, but I didn't:(

http://www.oreilly.com/catalog/shellsrptg/
http://www.oreilly.com/catalog/unixnut4/

Brian


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to