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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -