-
August 15th, 2003, 11:51 AM
#1
Member
red hat shell script
Hi all,
hoping you can help. i am working on writing just basic shell scripts for an extra credit class assignment. two questions:
1. i can add expressions with the following command...prod=`expr 5 + 6`, but can't figure out the symbol for multiplication. the * character will not work for me.
2. i also am looking to write a small script that takes in a user name and outputs the # of processes being run by that person. not each individual process, just the total number. here is what i have so far:
echo "Please input a user name to see their total # of processes:"
read name
then i am trying to use the "ps -ef" command to display the currently running processes, the variable $name for whatever was typed in by the user, and a counter using grep or we -l. if i'm confusing please ask whatever questions you like. thank you in advance for your assistance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|