simple read $a / grep question
Hi,
I wanted to write a simple script to kill a particular program. My question is as follows: why does 'ps ax | grep $1' work without any problems and 'ps ax | grep $number' returns errors with usage or grep? Code:
#!/bin/bash I also tried ps ax | grep `echo $number` ps ax | grep $(echo $number) thanks |
should be
read number |
thanks:) it works fine now
|
All times are GMT -5. The time now is 03:11 AM. |