Sup,
I'm about to limit ps-command output to list only user current processes.
I've created a bash-script to /bin/ps and moved original ps to ps123.
My bash-script works now well, after hours with nano & Google.
The script is a bit tricky since I wanted '/bin/sh /bin/ps' and 'sed ...'-rows out of the list.
Code:
#!/bin/sh
echo "Running processes for user $USER"
echo
procs=`/bin/ps123 -u $USER -U $USER u | (sed -e '/bin\/ps123/d' -e '/bin\/ps/d' -e '$d')`
echo "$procs" | (sed -e 's/$/\ /')
exit 1
My only problem is how to make this script unreadable but executable?
I don't want, that users can read the script above so I'm asking help here.
Tried to chmod & chgrp - with no effect. The script can only be (readable and executable) or (unreadable and unexecutable).
My advices are finished, yours ll'be appreciated!
Regards,
tme