Help! Are there any shell scripters around?
I am writing a simple script to return some basic statistics captured in a systems log; however, I am having the following issue:
first I define a variable as a list returned by a grep search:
grep "some_expression" some.log | sort -u
Next I use a for loop to sweep through the list to do a computation:
for VAR in $VAR_LIST
grep $VAR some.log | compute some value and return it
The problem is that instead of grepping “xxx aaa_bbb_ccc” it greps “xxx” and “aaa_bbb_ccc” separately. How do I just get each line and not every “word” in the line to be treated as a variable?
I am running bash v3.0 on Solaris v10.5