My program usage takes the form for example;
$ theApp 2 "one or more words"
i.e. 3 command line arguments; application name, an integer, some text
My code includes the following 4 lines:
int anInteger;
char words;
sscanf(argv, "%d", &anInteger);
sscanf(argv, "%s", &message);
Based... (2 Replies)
I am trying to print command line arguments one per second. I have this
while
do
echo "6"
shift
echo "5"
shift
echo "4"
shift
echo "3"
shift
echo "2"
shift
echo "1"
shift
done (2 Replies)
I have this while loop and at the end I am trying to get it to tell me the last argument I entered. And with it like this all I get is the sentence with no value for $1. Now I tried moving done after the sentence and it printed the value of $1 after every number. I don't want that I just want... (2 Replies)
Hi,
I have to store all the command line arguments into an array.
I have the following code.
**********************
#! /bin/sh
set -A arr_no_updates
i=1
while
do
arr_no_updates=$($i)
echo ${arr_no_updates}
i=$(($i+1))
done**************** (1 Reply)
I have this code, I thought it would automatically know the args sent to script when called from shell. But it seems to not see any...
main script:
. args
. errors
. opt
. clean
dbfile=""
opfile=""
# calls function in script below
chkarg
#check commands (2 Replies)
Hi,
i have a perl script named test.pl. It is executed as
cat *.log|test.pl
i need the complete command line args. I tried using basename $0 but im getting test.pl only but not cat *.log...
Can anyone help me on this.
Thanks in advance (3 Replies)
Hi,
Can you please hint me how to achieve the below?
Input:
$./script.sh start 1 2
Internally inside the script i want to set a single variable with $2 and $3 value?
Output:
CMD=$1
ARGS=$2 $3
--VInodh (10 Replies)
Hello All,
I have a Bash Script and an Expect script that together will SSH to another server and
do some stuff there... From within the Bash Script I process the Command Line Arguments,
which are Required Args and Optional Args.
When I call the Expect script from the Bash Script, I pass... (4 Replies)
I'm using getopts to process command line args in a Bash script. The code looks like this:
while getopts ":cfmvhs:t:" option; do
case $option in
c) operationMode="CHECK"
;;
f) operationMode="FAST"
;;
m) ... (6 Replies)
Discussion started by: gencon
6 Replies
LEARN ABOUT REDHAT
rhnsd
UP2DATE(8) Red Hat, Inc. UP2DATE(8)NAME
rhnsd - a program for quering the Red Hat Network for updates and information
SYNOPSIS
rhnsd [OPTION]...
DESCRIPTION
rhnsd is a daemon process that runs in the background and periodically polls the Red Hat Network to see if there are any queued actions
available. If any are queued, it runs them.
rhnsd is typically started from the init scripts in /etc/init.d/rhnsd when it's time to poll the Red Hat Network servers for available
updates and actions. The default interval is every 120 minutes. The minimum polling interval is 60 minutes.
To check for updates, rhnsd runs an external program called rhn_check. This is a small application that actually makes the network connec-
tion to Red Hat Networks.
The rhnsd daemon does not listen on any network ports, nor does it ever talk to the network directly. Any network activity is done via the
rhn_check utility.
rhnsd can be configure by editing the /etc/sysconfig/rhn/rhnsd config file. This is actually the configuration file the rhnsd init script
/etc/init.d/rhnsd uses.
-i, --interval
Specify the interval that rhnsd should wait between checking the Red Hat Network. Default is 120 minutes, the minimum is 60 minutes.
This can also be specified in /etc/sysconfig/rhn/rhnsd
-v, --verbose
output more information about what rhnsd is doing.
-f, --foreground
force the rhnds process to run in the foreground instead of automatically backgrounding itself, as it does by default.
FILES
/etc/sysconfig/rhn/rhnsd
Configuration settings for the rhnsd daemons init script.
/usr/sbin/rhn_check
The external program launched by rhnsd to connect to the Red Hat Network and retrieve any actions that have queued up.
/etc/sysconfig/rhn/systemid
A certification that authenticates the client machine to the Red Hat Network. Generated via the up2date or rhnreg_ks utility.
SEE ALSO
The rhnsd daemon is tightly coupled with Red Hat Network. Visit <http://www.redhat.com/network> for access or to sign up.
rhn_check(8), up2date(8), up2date-config(8),
AUTHORS
Written by Preston Brown <pbrown@redhat.com> and
Cristian Gafton <gafton@redhat.com>
REPORTING BUGS
Report bugs to <http://bugzilla.redhat.com>.
COPYRIGHT
Copyright (C) 1999, 2000 Red Hat, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
4th Berkeley Distribution Fri Feb 9 2001 UP2DATE(8)