Need Help


 
Thread Tools Search this Thread
Operating Systems AIX Need Help
# 1  
Old 10-08-2009
Need Help

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.

Thanks,
Swati
# 2  
Old 10-08-2009
Hello,

Per our forum rules, all threads must have a descriptive subject text. For example, do not post questions with subjects like "Help Me!", "Urgent!!" or "Doubt". Post subjects like "Execution Problems with Cron" or "Help with Backup Shell Script".

The reason for this is that nearly 95% of all visitors to this site come here because they are referred by a search engine. In order for future searches on your post (with answers) to work well, the subject field must be something useful and related to the problem!

In addition, current forum users who are kind enough to answer questions should be able to understand the essence of your query at first glance.

So, as a benefit and courtesy to current and future knowledge seekers, please be careful with your subject text. You might receive a forum infraction if you don't pay attention to this.

Thank you.

The UNIX and Linux Forums
# 3  
Old 10-08-2009
Continued here
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question