LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Hiding arguments in shell scripts (https://www.linuxquestions.org/questions/linux-software-2/hiding-arguments-in-shell-scripts-401084/)

3saul 01-09-2006 01:03 AM

Hiding arguments in shell scripts
 
I'm writing some shell scripts that execut a lot of external commands and when I look at the process in system monitor it displays every single command in the arguments section. How can I prevent this from happening? How can I stop the arguments from being displayed?

bulliver 01-09-2006 01:26 PM

Don't run the scripts...

A trite answer, but I don't think it is possible. If your real problem is that you don't want regular users to see what you're doing, then look into the grsecurity patches and use 'proc restrictions' which will allow users to view only their own processes in /proc, ps, etc...

If not, then please tell us what your real goal is.

pixellany 01-09-2006 02:44 PM

When you run a script, anything that generates output goes to the mysterious "stdout". When you call your script from a terminal session, then that terminal is stdout. All you need to do to suppress the output is redirect it elsewhere---eg to a file, to /dev/null, etc.
If you run a script from an application link, then nothing gets displayed anywhere--unless of course, the script tells the OS to open a window by some means.

Does this relate to your question??


All times are GMT -5. The time now is 05:19 PM.