09-02-2004
Quote:
Originally posted by zazzybob
...She can even say "google", "awk", and "grep" ...
She'll go far
7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear Frenz,
Is there any possbility to get the list of previous commands that
i executed in SCO-Unix and reexecute them as required.
Like Doskey in DOS
Please help me
Regards
myuser (3 Replies)
Discussion started by: myuser
3 Replies
2. UNIX for Dummies Questions & Answers
O/P of the uname -a
Server Server 4.0 3.0 3516 Pentium IV(TM)-ISA/PCI
Server is getting rebooted frequetly...
I don't know what is the problem in server ...
Any help why the server is getting rebooted frequetly.
Can i check what is the problem like in log files (5 Replies)
Discussion started by: srikanthus2002
5 Replies
3. HP-UX
hi,
I am facing a sever problem in mu HO-UX 11.11.0 Server which is getting hanged for last 3/4 days.
Its giveing error insufficient memory. Earlier this problem was not there.
We are using oour ERP & informix on the same. There no heavy & sudden increase of data.
When I checked the... (3 Replies)
Discussion started by: micku_100
3 Replies
4. Solaris
Deall All,
I have facing some problem. I have a Sun 4500 Server at the customer place. Now the server is not booting mean's once the server is coming up it is automatically rebooting. As this is the critical server for the customer that is use for production .
Can this be solved by... (10 Replies)
Discussion started by: sudhansu
10 Replies
5. Linux
I have Red hat Linux server. There are 14 NFS shares which are coming from NAS. There are so many messages filling /var/log/messages, which seems like some NFS logging is enables somewhere, but I am not able to figure it out. Every few minutes, it will filll my /var (which is part of root) to 100%... (2 Replies)
Discussion started by: solaris_1977
2 Replies
6. Linux
I have a Linux server that runs a Java based app that automates file transfers for a large number of users/systems. I'm running into a problem with the scripts for this automation program in that when I have a function in the script generate an output file, and the next line requires that file to... (1 Reply)
Discussion started by: acascianelli
1 Replies
7. Red Hat
Hi Experts,
I have an issue where the interface card went down for like four times in last one week in redhat linux server. Every time it goes down, it comes back.
2014 Oct 21 07:22:14 <hostname> kernel: nx_nic: NIC Link is down
2014 Oct 21 07:22:21 <hostname> kernel: nx_nic: NIC Link is... (3 Replies)
Discussion started by: dhanu1985
3 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)