10 More Discussions You Might Find Interesting
1. 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
2. Programming
Hello,
How to pass arguments to make thru command line? Have read this and that threads, but still not clear. My customized Makefile as:
# convert_program.mk:
run:
bash bash_srcipt.sh
clean:
rm ${OUT_PATH}/result.txtWhat I intend is to run like this:
$ make -f convert_progam.mk... (4 Replies)
Discussion started by: yifangt
4 Replies
3. 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
4. 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
5. Shell Programming and Scripting
Hi All,
I am trying to pass a parameter to AWK on my KSH shell prompt as below.
var1=2
echo $var1
awk -v var2=${var1} '{print var2}' testfile.txt
I am passing the input file (testfile) to awk to get some o/p. It is having 10 records.
When I run AWK, it is throwing the following errors... (1 Reply)
Discussion started by: Raamc
1 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,
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
8. Shell Programming and Scripting
I have written a Shell Script Program which accepts 3 parameters as shown below:
./calc 20 + 2
in the above line ./calc is the Shell Script itself with 3 parameters, namely:
20
+
and 2.
Well, now let's look inside the Script:
result=$1$2$3
echo $result
The output will be as... (8 Replies)
Discussion started by: indiansoil
8 Replies
9. 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
10. 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