#!/usr/bin/bash a="test2 ssss" grep $a test.txt | wc -l
#!/usr/bin/bash a="test2 ssss" grep "$a" test.txt | wc -l #変数$aをダブルクォーテーションで囲む
Back to top