head -n 1 ~/.fvwm/config | grep -c "some-string"
It's the output from grep I need to put into a shell variable.
Also - I appreciate tips for other commands giving the same output.
head -n 1 ~/.fvwm/config | grep -c "some-string"
It's the output from grep I need to put into a shell variable.
Also - I appreciate tips for other commands giving the same output.
If you're using kshell or bash then this will work:
variable=$(head -n 1 ~/.fvwm/config | grep -c "some-string")
That worked, thank you very much.
/Swepter