Hello Everyone,
I am new to shell scripting and also i am very new to AIX machine
I have a question.
I have shell script which contains the follwing
"ps -e |grep $1
echo $2"
i run this schell script by doing this ./startSehllscript 3444 passed with two parameters .
Accroiding my assumption i though it will print the pid details with the parameter 2.
but when i run this script it could return me back kust a single string "passed"
I wanted to get the process deatils.
If i run this "ps -e |grep $1" in the UNIX shell it runs fine and gives me back the pid details but when i do it by the shell script it deos not return me back the pid details.
How can we write the commadn ina such a way that it will return me back the pid details.
I would really appreciate if some one can answer my question.
Hello,
Sorry for the inconvenience...I am rephrasing my question.
My main goal is to execute a shell script which will take "pid" as a parameter and the shell script should print the details of the "pid".
For this purpose i have created a shell script with the following content..
"ps -e |grep $1
echo $2"
When i execute the script with the parameter pid with some other parameter it does not print the pid .......