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

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -