02-03-2012
Using a passwordless ssh is far more suitable you know...
Search the forums on how to achieve this (exchange of public keys...))
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. Solaris
Dear All,
We are going for Disaster Recovery project, the vendor asked for more details about how much is the daily data changes only. using sar / iostat can any one help me to collect this ?!
Note: only I need the changed data size not the daily increasing data. this is to know how much... (1 Reply)
Discussion started by: adel8483
1 Replies
3. Shell Programming and Scripting
How can my unix shell script automatically connect to remote host?
Assume that there is a remote host called "rhost". When I connect to that host i give the command "telnet rhost".
It then asks me for my id and password. Once i give it connects there.
I want to automate these steps. I want... (8 Replies)
Discussion started by: digdarshan
8 Replies
4. UNIX for Dummies Questions & Answers
hi
I am very new to UNIX.
I need to retrieve data from a unix system and store it and display as output on a windows system.
Initiation of procedure is through JAVASCRIPT-based buttons on a HTML page.
This should cause a set of commands to run which colllect data from a unix based server and... (1 Reply)
Discussion started by: rossalyn_maxter
1 Replies
5. Shell Programming and Scripting
Hi All ,
In my environment we have 12 SAN switches .Culd u pls help me for below queries .
would like to telnet to all switches and collect information in daily basis with "switchstatus" command and store the output under /tmp/ folder on systemA .
To keep passwords of 12switches in a... (1 Reply)
Discussion started by: chinni-script
1 Replies
6. Shell Programming and Scripting
hi all
I am looking for shell script ,by which i need to gather all the DB information in Sybase server .
Thanks in advance :) (3 Replies)
Discussion started by: mvsramarao
3 Replies
7. UNIX for Dummies Questions & Answers
Hi
Kindly provide me shell script on server to collect inbound connections, using port number on Linux. (4 Replies)
Discussion started by: adminhelp
4 Replies
8. Shell Programming and Scripting
I m trying to run a batch script in remote desktop which executes unix commands on the unix server...the problem is i wnt the output in HTML format.so in my batch script i m giving the cmd like
ssh hostname path ksh HC_Report.ksh>out.html
...but it generates the HTML file in
remote desktop .i... (2 Replies)
Discussion started by: navsan
2 Replies
9. SuSE
Dear users,
SUSE 10 sp3 and SUSE 11.
I made configuration changes in '/etc/syslog-ng/syslog-ng.conf'
to move SYSLOG content to LogRhythm.
This is what I changed in the file.
Un-comment out the following lines
#Enable this and admop IP to send log messages to... (10 Replies)
Discussion started by: JDBA
10 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)