Agree with spacebar -- can be simplified. My thoughts:
As to the reason for your error, you cannot use a shell variable ($i in this case) like you are attempting (in single quotes shell will not expand it). You could try:
But I would try something that is much more straight forward than the way you were approaching it.
Last edited by agama; 10-20-2012 at 11:12 PM..
Reason: fixed cut/paste truncation.
hello.,
i have 2 files..
1 file is in this folder
/home/test/ssk/DSA.WLG.20050713211544.20050710.20050713211544
(this part)
other file is in this folder
/home/kk/dev/DSA.WLG.20050711210100.20050710.20050711210100
... (1 Reply)
hi all
i am writing the korn shell script.
i have a SQL script which gives me the folowing output
DSA.WLG.20050713211544.20051025.20050713211544 28991 1130198400
DSA.WLG.20050713211544.20051025.20050713211544 25881 1130198400
DSA.WLG.20050711210100.20051025.20050711210100 25881 ... (3 Replies)
I have this Korn shell script that runs via a cron entry. It runs in a loop "watching" a specific file system for files with a certain name. The file system that it is watching is an upload file system for an FTP server. When files that are the correct name come in, it takes the extension of the... (1 Reply)
Hello All,
Can someone help me to set a user's password from the script using korn shell. The password change is a one time password after user account creation.
I tried providing the input file as the value for password field but password change requires tty so my password from an input file... (3 Replies)
I have to solve some exercises in Korn Shell, but i'm having some problems. For example:
Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written.
I... (3 Replies)
1. The problem statement, all variables and given/known data:
Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written.
2. Relevant commands, code,... (3 Replies)
There are 4 parameters that I have to pass from korn shell to sql script.
1) I have to check if $1 , $2 , $3 and $4 are null values or not .
How can I do that ?
2) Once its determined that these values are null (in the sense they are empty) how can I pass null values to sql script... (11 Replies)
I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies
LEARN ABOUT OSF1
cfgmgr_get_state
cfgmgr_get_state(9r)cfgmgr_get_state(9r)NAME
cfgmgr_get_state - General: Determines the configuration state
SYNOPSIS
int cfgmgr_get_state(
char *driver_name,
int *driver_cfg_state );
ARGUMENTS
Specifies the name of the device driver whose configuration state you want to obtain. This name is a string that matches the string you
specified for the entry_name item in the /etc/sysconfigtab database. Typically, third-party driver writers specify the driver name (fol-
lowed by a colon) in the sysconfigtab file fragment, which gets appended to the /etc/sysconfigtab database during the driver product
installation. Returns one of the following state value bits to the driver_cfg_state argument: The specified device driver is in the
dynamic configuration state. This means the driver was dynamically configured into the kernel. The specified device driver is in the
static configuration state. This means the driver was statically configured into the kernel.
DESCRIPTION
The cfgmgr_get_state routine obtains the configuration state of the specified device driver. The specified device driver is in either the
static configuration state or the dynamic configuration state.
The cfgmgr_get_state routine returns the state value in the driver_cfg_state argument. Driver writers should store this state value in an
xx_is_dynamic variable or some similarly named variable.
You typically call the cfgmgr_get_state routine in the CFG_OP_CONFIGURE entry point of the device driver's configure routine.
RETURN VALUES
Upon successful completion, cfgmgr_get_state returns the value ESUCCESS. This success value indicates that cfgmgr_get_state returned the
configuration state of the specified device driver in the driver_cfg_state argument. Otherwise, cfgmgr_get_state returns one of the follow-
ing error constants defined in /usr/sys/include/sys/sysconfig.h and /usr/sys/include/sys/errno.h: The device driver that you specified in
the driver_name argument does not exist. In this case, cfgmgr_get_state cannot return the configuration state of the specified device
driver in the driver_cfg_state argument. The device driver that you specified in the driver_name argument is not a valid name.
EXAMPLES
See Writing Device Drivers: Tutorial for a code example of the cfgmgr_get_state interface.
SEE ALSO
Routines: cfgmgr_set_status(9r)cfgmgr_get_state(9r)