09-30-2011
That is exactly what w does ( read the man pages...).
You could try from a "master" box to execute your job using rdist ( but long since last time I did such things..) or use cron/at on all boxes and get them to write all at the same place (using NFS?)
9 More Discussions You Might Find Interesting
1. Programming
Hi !
Please tell me how to get radio buttons, text boxes , check boxes , option buttons , pull down menus in C++ on Unix.
I think it would be done using curses.h ..but that's all i know.
TIA,
Devyani. (3 Replies)
Discussion started by: devy8
3 Replies
2. UNIX for Dummies Questions & Answers
I have been asked to write a unix script to log and report all users logging on to our unix boxes as either the root or oracle users only on a 24 hour basis.
This should trap the logon and logoff time,if possible what they are doing and their username.
Thanks in Advance (2 Replies)
Discussion started by: irehman
2 Replies
3. UNIX for Dummies Questions & Answers
Hello,
does anyone have a script that can check the contents of the /tmp directory and for example e-mail the directory content if anything other than session files are present?
Maybe there are better ways to monitor suspicous /tmp and /var/tmp activity, if so I'm listening :) (1 Reply)
Discussion started by: jamesbond
1 Replies
4. UNIX for Dummies Questions & Answers
Once upon a looong time ago I used to work with Unix systems - SGI mainly.
Now I've inherited 2 boxes - an SGI dual processor Octane and an Indigo2. For the past 2 years they've sat waiting for me to do something with them and never getting round to it.
I run a windows network at home so... (3 Replies)
Discussion started by: JimmyChang
3 Replies
5. UNIX for Dummies Questions & Answers
I am really confused as to how to install a piece of software on Unix especially after having worked with Windows for over 10 years.
I see the tar.gz, tar.gz2 and rpm packages.
How do I install these things? Do I have to be a root to do this?
If its only the root, then how do users generally... (4 Replies)
Discussion started by: Legend986
4 Replies
6. AIX
Hi All,
I would like to monitor the volume of Data that is transferred through a single port in AIX. I have nmon installed in my machine. What is the best possible solution for this problem.
Thanks in Advance. (3 Replies)
Discussion started by: bravo13
3 Replies
7. Solaris
Hello,
First post so bear with me....i've done lost of searches on this and did not find a definitive answer.
I need to be able to capture in log every single keystroke a user performs, I am aware that the script command can be used to do this, however, here is my dilemma/problem.
Here... (1 Reply)
Discussion started by: giles.cardew
1 Replies
8. Solaris
Hi
How to configure sudo in all unix boxes.
plz provide the step by step process.
Regards
Praveen (3 Replies)
Discussion started by: tv.praveenkumar
3 Replies
9. Red Hat
I have 2 RHEL 5.9 system where customized applications are running.
These 2 servers are with in a network (LAN) with each other.One application in say Server 1 can talk to another application in server 2 and vice versa.
The applications are exchanging data among each other.
Recently I am... (0 Replies)
Discussion started by: Anjan Ganguly
0 Replies
LEARN ABOUT DEBIAN
shell-quote
SHELL-QUOTE(1p) User Contributed Perl Documentation SHELL-QUOTE(1p)
NAME
shell-quote - quote arguments for safe use, unmodified in a shell command
SYNOPSIS
shell-quote [switch]... arg...
DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands
or files with embedded white space or shell globbing characters safely. Here are a few examples.
EXAMPLES
ssh preserving args
When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and
passes them to "$SHELL -c". This doesn't work as intended:
ssh host touch 'hi there' # fails
It creates 2 files, hi and there. Instead, do this:
cmd=`shell-quote touch 'hi there'`
ssh host "$cmd"
This gives you just 1 file, hi there.
process find output
It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to
split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote:
eval set -- `find -type f -print0 | xargs -0 shell-quote --`
debug shell scripts
shell-quote is better than echo for debugging shell scripts.
debug() {
[ -z "$debug" ] || shell-quote "debug:" "$@"
}
With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can.
save a command for later
shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command
you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are
things the user can't pass through), you can do something like this:
user_switches=
while [ $# != 0 ]
do
case x$1 in
x--pass-through)
[ $# -gt 1 ] || die "need an argument for $1"
user_switches="$user_switches "`shell-quote -- "$2"`
shift;;
# process other switches
esac
shift
done
# later
eval "shell-quote some-command $user_switches my args"
OPTIONS
--debug
Turn debugging on.
--help
Show the usage message and die.
--version
Show the version number and exit.
AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions.
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.8.4 2005-05-03 SHELL-QUOTE(1p)