03-09-2013
Quote:
Originally Posted by
Salim_Linux
Hello Gurus
Am facing situation to chomp webpage and get the values from in it and that value need to monitor by nagios . could you advise me how i can achieve this task .
Thanks
can you provide a sample of the information you're trying chomp?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi I was wondering how do I make my own webpage??? :rolleyes::confused: (4 Replies)
Discussion started by: babysoft19
4 Replies
2. IP Networking
I have SCO OpenServer 5 connected to the Internet and I would like to change the webpage that appears when I try from another computer the address: http://192.1xx.xx.xx. If I try this, a page about SCO appears, but I don't know where can I find it.
Thanks:cool: (1 Reply)
Discussion started by: SuPeRbYtE
1 Replies
3. Linux
Please help me to start with this trek...
What are the steps for me to implement at FTP functionality on my web page... we have a linux box as our proxy server... (0 Replies)
Discussion started by: shiny
0 Replies
4. Shell Programming and Scripting
Hi,
Is there a way to cat a file on Webpage? . Thanks in advance (3 Replies)
Discussion started by: rider29
3 Replies
5. Shell Programming and Scripting
${array} = /export/home
Trying to get rid of the initial "/"
chomped_array=`sed 's///^ /g' ${array}`
chomped_array=`sed 's////g' ${array}`
chomped_array=`sed 's////g' "${array}"`
Can't seem to get it right... the output is always
"First RE may not be null"
Thanks in advance. I... (4 Replies)
Discussion started by: adelsin
4 Replies
6. Shell Programming and Scripting
Hi,
I would like to open a webpage from an IP# from a file.
Lets say I findout an IP address from using grep
grep John remotecomputers.txt
result: 192.168.2.1
Then after that I would like to increment the IP# to 192.168.2.2 from 192.168.2.1
After that I woud like to launch mozilla or... (2 Replies)
Discussion started by: tthach830
2 Replies
7. Infrastructure Monitoring
Dear All,
I have Nagios running on a PC which has two ethernet cards, eth0 and eth1. Each interface is on a different network, like eth0 is on n/w 10.111.X.X and eth1 is on n/w 100.1.X.X (recently configured). The Nagios webpage is accessed remotely by typing 10.111.X.X/nagios3/ i.e. via the... (0 Replies)
Discussion started by: salim100569
0 Replies
8. Shell Programming and Scripting
Hi All
Below is Code, It opens a link from which it ask a login name and password, the script enter the login name and password and navigate to next page..
In the next page there is a drop down box from which i have to select a value, I have written the code but it gives error
#!/usr/bin/perl... (3 Replies)
Discussion started by: parthmittal2007
3 Replies
9. Infrastructure Monitoring
We have a dual Nagios server setup. One is setup for internal server monitoring on our LAN, while the second Nagios server is hosted externally and is used for external checks only such as URL and ping checks form the WAN side.
I was wondering if there is any way to setup cross dependencies... (1 Reply)
Discussion started by: eugenes18t
1 Replies
10. Solaris
Hi,
I need to display the output of a script in web page. Can anyone suggest me how to do that? (5 Replies)
Discussion started by: Arasu
5 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)