【发布时间】:2013-04-25 23:51:58
【问题描述】:
如何分配结果
grep -c "some text" /tmp/somePath
放入变量中,以便我可以回显它。
#!/bin/bash
some_var = grep -c "some text" /tmp/somePath
echo "var value is: ${some_var}"
我也试过了:
some_var = 'grep -c \"some text\" /tmp/somePath'
但我不断收到:command not found。
【问题讨论】: