Friday, 9 August 2013

How do I use sed on a string?

How do I use sed on a string?

I want to use sed with strings in a bash script without having to read or
write to any files. I googled around and I couldn't find anything
Specifically I am trying to get the number of files in a given directory
by doing somethign like:
RAW=$(ls $DIRNAME | wc)
# RAW --> ? sed ? --> answer

No comments:

Post a Comment