bash - How do I use sed on a string? -
i want use sed strings in bash script without having read or write files. googled around , couldn't find anything
specifically trying number of files in given directory doing somethign like:
raw=$(ls $dirname | wc) # raw --> ? sed ? --> answer
it's not sed
, better problem.
ls | wc -l
in general, sed
takes string input. example,
ls | sed 's/\./period replaced sed/g'
Comments
Post a Comment