06-25-2002
We are focsing on the question:
Q1. user was asked for input data or value, so that user can enter any number of data or value like: 1 4 a 45 23 ... then pass those values to the function?
Q2. the above script show in the way to limit 4 values input, can 4 values using only 1 variable in which passing the value to the function only get $1 variable instead?
can u get me?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Just wanted to know if there is a way to pass the table name as a parameter in the control file.
I have two tables...Table A and Table B.
LOAD DATA
append
INTO TABLE TABLE_B
FIELDS TERMINATED BY X'09' OPTIONALLY ENCLOSED BY '"' AND '"'
TRAILING NULLCOLS
Rather than hard coding... (1 Reply)
Discussion started by: madhunk
1 Replies
2. Shell Programming and Scripting
Hallo everyone,
This is my problem below:
/home/cerebrus/pax=>vat class2.sh
ksh: vat: not found
/home/cerebrus/pax=>cat class2.sh
#!/bin/ksh
set -x
bdf|grep appsdev|awk '{ print $5 }'> class3
dd={cat class3}
echo $dd
/home/cerebrus/pax=>
/home/cerebrus/pax=>./class2.sh
+ bdf
+... (8 Replies)
Discussion started by: kekanap
8 Replies
3. UNIX for Advanced & Expert Users
I need to pass a parameter to a function in a script. My parameter is a string. When I display the parameter within my function, I only get the first word from string I pass in.
How can I make the function receive the whole string (and not terminate at the first space it encounters)?.
part of... (2 Replies)
Discussion started by: fastgoon
2 Replies
4. Programming
Hi,
How to pass parameter to makefile?
Please let me know if any one knows and also please put an example of makefile with this feature.
thanks,
Manju. (3 Replies)
Discussion started by: manju_p
3 Replies
5. Shell Programming and Scripting
Hi All,
I developed a KSH script which will accept two parameters as input. These two parameters are some directories paths.
In the script i am validating the number of paramaters it received as below
#--------------------------------------
# Check Command line arguments... (8 Replies)
Discussion started by: Raamc
8 Replies
6. Shell Programming and Scripting
Hi,
PW='/as sysdba'; export PW
in other module I call sqlplus ${PW} (this line I unable to change!)
How I can define PW so that sqlplus calls PW in quotes i.e sqlplus '/as sysdba'
I tried like this
PW="'/as sysdba'"; export PW - no luck
Thanks in advance (2 Replies)
Discussion started by: zam
2 Replies
7. Shell Programming and Scripting
Hi All,
When passing parameters to a sheel script, the parameters are referenced by their positions such as $1 for first parameter, $2 for second parameter. these positional values can only have values ranging from $0-$9 (0,1,2,3...9).
I have a shell script meant to accept 20 parameters. for... (3 Replies)
Discussion started by: ogologoma
3 Replies
8. Shell Programming and Scripting
i am passing input parameter 'one_two' to the script , the script output should display the result as below
one_1two
one_2two
one_3two
if
then
echo " Usage : <$0> <DATABASE> "
exit 0
else
for DB in 1 2 3
do
DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}`
done
fi (5 Replies)
Discussion started by: only4satish
5 Replies
9. Shell Programming and Scripting
Hi,
I've written a script where eleven parameter to be passed from command line
which is inserting into an oracle table,
it is working but the tenth and 11th parameter are not accepting as given
it is referring to 1st parameter.
HERE IS THE SCRIPT
#!/bin/ksh
#set -o
echo $*... (4 Replies)
Discussion started by: sankar
4 Replies
10. Shell Programming and Scripting
Hi ,
I am passing date parameter through file
my shell script testing.sh is
#set -x
#set -v
asd=$1
asd1=$2
echo $asd
echo $asd1
Passing parameter as below
sh testing.sh `cat file1.txt`
Output (2 Replies)
Discussion started by: kaushik02018
2 Replies
consvar(8) System Manager's Manual consvar(8)
NAME
consvar - Manipulate system firmware console environment variables
SYNOPSIS
/sbin/consvar [-v] [-nc] -g -s -l -a -d [variable] [value]
OPTIONS
Verbose mode. Prints out the system IDs used by firmware, the current firmware revision, and information about the process. Get the value
of the specified console environment variable. Set the value of the specified console environment variable. List the values of all vari-
ables supported by this platform that are not disabled. This is similar to the show SRM console command. Save the values of all environ-
ment variables to non-volatile storage. Setting a variable with the -s option only updates the in-memory copy of console environment vari-
ables. The save process could take a long time on some platforms, so it is recommended that the variables are saved after all set opera-
tions have been performed. List the system and exception database information. Do not perform value conversion. Variables that contain
device information have an underlying console bootstring format. If this option is used, consvar does not convert between the Tru64 UNIX
names for these devices, but accepts and displays the raw values. The same goes for integer values which are converted between strings and
hexadecimal values.
DESCRIPTION
Use the consvar command to get, set, list, and save console environment variables available on SRM system firmware. Some firmware versions
on some platforms do not comply with the Alpha SRM when dealing with certain variables, or operations. To ensure UNIX functionality with
such firmware, an exception database is consulted and these operations are disabled. By default, consvar accepts and displays device values
with Tru64 UNIX device names, or their device special file names. The raw console bootstrings can be used by providing the -nc option. For
information regarding the console environment variables, please refer to the Alpha System Reference Manual.
RETURN VALUES
Success. Failure.
EXAMPLES
To show the values of all available console variables, enter: % consvar -l To get the value of the booted_dev variable, enter: % consvar -g
booted_dev
A message similar to the following will be displayed: booted_dev = disk0 To set the value of boot_dev, enter the device name of the
required boot device: % consvar -s boot_dev disk0
To save the values of the variables across system resets, enter: % consvar -a If an operation fails, you can find out if it is dis-
abled by using the -v option. For example, to see if the bootdef_dev variable is disabled, enter: % consvar -v -g bootdef_dev The
exception database can be printed out along with the status of the current platform's console variable support by entering: %
consvar -v -d
FILES
Specifies the command path. Exception database.
SEE ALSO
Functions: getsysinfo(2), setsysinfo(2)
consvar(8)