How to assign the result of
grep -c "some text" /tmp/somePath
into variable so I can echo it.
#!/bin/bash
some_var = grep -c "some text" /tmp/somePath
echo "var value is: ${some_var}"
I also tried:
some_var = 'grep -c \"some text\" /tmp/somePath'
But I keep getting: command not found
.