Also your problem with $1 is that within the function ftpbuild you can only access the parameters passed to that function when it was called not those passed to the whole script. call ftpbuild like this to pass the main script parameters on to the function:
i want to redirect output of one command as the command line argument of another script
for example, say i would run this command:
find . -xdev -type f -size +4096 -exec ls -al {} \;
i wan to be able to do something like:
echo +4096 | find . -xdev -type f -size ****** -exec... (3 Replies)
Hi,
I am facing a problem to pass command line arguments that looks like
<script name> aa bb "cc" dd "ee"
I want to pass all 5 elements include the " (brackets). when I print the @ARGV the " disappear. I hope I explain myself
Regards,
Ziv (4 Replies)
Hi,
I have a very small requirement where i need to pass command output as an argument while invoking the shell script..
I need to call like this
sh testscript.sh ' ls -t Appl*and*abc* | head -n 1'
This will list one file name as ana argument..
I will be using "$1" in the shell... (2 Replies)
I have one working awk command line. Which taking data from the “J1202523.TXT” file and generating the “brazil.dat” file. PFB code.
awk '{ DUNS = substr($0,0,9);if ( substr($0,14,3) == "089" ) print DUNS }' J1202523.TXT > Brazil.dat
But now I want to pass two parameter as a command line argument... (4 Replies)
I want to make a script which takes the number of argument, add those argument and gives output to the user, but I am not getting through...
Script that i am using is below :
#!/bin/bash
sum=0
for i in $@
do
sum=$sum+$1
echo $sum
shift
done
I am executing the script as... (3 Replies)
I want to make a script that check for the argument passed to it and generates an error in case any character/string argument passed to it.
I am using below code, but its not working. can anyone help.
#!/bin/bash
if ]; then
echo 'An integer argument is passed to the script hence... (3 Replies)
I need to write a shell script, when I run that script I should pass those arguments if not, then script should not run and pass the error message like
invalid option - - should pass the argument.
and Exit from the script
https://www.unix.com/images/misc/progress.gif (1 Reply)
I need to write a shell script, when I run that script I should pass those arguments if not, then script should not run and pass the error message like
invalid option - - should pass the argument.
and Exit from the script (8 Replies)
Hi Experts,
I have been trying to work on a simple shell script that will just add the two argument passed to it. Here is what i tried :
#!/bin/bash
welcome(){
echo "Welcome to this Progg. which will accept two parameter"
}
main_logic(){
arg=$#
echo "Number of argument passed is... (4 Replies)
Discussion started by: mukulverma2408
4 Replies
LEARN ABOUT DEBIAN
bb-ack.cgi
BB-ACK.CGI(1) General Commands Manual BB-ACK.CGI(1)NAME
bb-ack.cgi - Xymon CGI script to acknowledge alerts
SYNOPSIS
bb-ack.cgi?ACTION=action&NUMBER=acknum&DELAY=validity&MESSAGE=text
DESCRIPTION
bb-ack.cgi is invoked as a CGI script via the bb-ack.sh CGI wrapper.
bb-ack.cgi is passed a QUERY_STRING environment variable with the ACTION, NUMBER, DELAY and MESSAGE parameters.
PARAMETERS
ACTION is the action to perform. The only supported action is "Ack" to acknowledge an alert.
NUMBER is the number identifying the host/service to be acknowledged. It is included in all alert-messages sent out by Xymon.
DELAY is the time (in minutes) that the acknowledge is valid.
MESSAGE is an optional text which will be shown on the status page while the acknowledgment is active. You can use it to e.g. tell users
not to contact you about the problem, or inform them when the problem is expected to be resolved.
OPTIONS --no-pin
bb-ack.cgi normally requires the user to enter the acknowledgment code received in an alert message. If you run it with this option,
the user will instead get a list of the current non-green statuses, and he may send an acknowledge without knowing the code.
--no-cookies
Normally, bb-ack.cgi uses a cookie sent by the browser to initially filter the list of hosts presented. If this is not desired, you
can turn off this behaviour by calling bb-ack.cgi with the --no-cookies option. This would normally be placed in the CGI_ACK_OPTS
setting in hobbitcgi.cfg(5)--env=FILENAME
Loads the environment defined in FILENAME before executing the CGI script.
--debug
Enables debugging output.
FILES
$BBHOME/web/acknowledge_header
HTML header file for the generated web page
$BBHOME/web/acknowledge_footer
HTML footer file for the generated web page
$BBHOME/web/acknowledge_form
Query form displayed when bb-ack.cgi is called with no parameters.
ENVIRONMENT VARIABLES
BBHOME Used to locate the template files for the generated web pages.
QUERY_STRING
Contains the parameters for the CGI script.
BUGS
When using alternate pagesets, hosts will only show up on the acknowledgment page if this is accessed from the primary page in which they
are defined. So if you have hosts on multiple pages, they will only be visible for acknowledging from their main page which is not what you
would expect.
SEE ALSO bbgen(1), bb-hosts(5), hobbitserver.cfg(5)Xymon Version 4.2.3: 4 Feb 2009 BB-ACK.CGI(1)