KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I would like to use the lines coming from 'wc' as variables. For example: echo 'foo bar' > file.txt echo 'blah blah blah' >> file.txt wc file.txt 2 5 23 file.txt I would like to have something like $lines , $words and $characters associated to the values 2 , 5 , and 23 . How can I do that in bash?
Tags (comma-separated)
Save Edits
Cancel