These are the commands i tried thus far...all i get are a list of all the accounts auch as "apache service user" "sas administrator account" "control-m agent user" "ftp user" "and a whole lot of generic account names
The command you gave returns the same things though in a line to account name. No actual user names are in this list more just account user types
*
Thanks for the assistance though.
Last edited by Franklin52; 04-26-2013 at 09:47 AM..
Reason: Code tags
#!/bin/sh
who
echo "\r"
echo Enter the terminal ID of the user in use:
echo "\r"
read TERM_ID
echo "\r"
ps -t $TERM_ID | grep sh
echo "\r"
echo Enter the process number to end:
echo "\r"
read PID
echo "\r"
kill -9 $PID
What this code does is ultimately grab the PID of a users sh... (6 Replies)
How do I capture an error for any command I use.
For e.g if i try to zip a file and the file is not there. The regualr $? -gt 0 only tells its un-successful but won't tell me that the file is not there when I run through a script. How can I capture this error?
for e.g.. zip $x.zip $x... (1 Reply)