10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have written a script which will take input parameter as another script.
However, if the script passed as input parameter has parameters then this script doesn't work.
I have a script b.ksh which has 1 and 2 as parameters
I have a script c.ksh which has 3,4 and 5 as parameters
vi a.ksh... (1 Reply)
Discussion started by: Vee
1 Replies
2. Shell Programming and Scripting
Hi,
I have an XML file like the following...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ONDEMAND_JOB VERSION="5.1" LOCALE="en_US">
<IMPORT_JOBSET TC_CONNECTION_NAME="default" ENVIRONMENT="PRD" USERNAME="Administrator" PASSWORD="AdminPassword" CALENDAR="Main Monthly Calendar"... (3 Replies)
Discussion started by: Debalina Roy
3 Replies
3. Shell Programming and Scripting
I am trying to automate a testcase . I am installing some software and it waits for user input after displaying "Do you want to continue ? " I am trying to do this in shell scripting.
#!/bin/bash
#!/usr/bin/expect -f
/usr/bin/expect << EOF
spawn apt-get install openjdk-7-jdk
expect "*Do you... (1 Reply)
Discussion started by: Abdul Navaz
1 Replies
4. UNIX for Dummies Questions & Answers
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff |... (1 Reply)
Discussion started by: Sarita Behera
1 Replies
5. Shell Programming and Scripting
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies
6. Shell Programming and Scripting
I need to parse log files using nawk, but I'm not able to pass script input argument (date) to nawk, for example:
------------
#!/bin/ksh
read date
nawk -F, '{if($1==date) print $4" "$5}'
-------------
Is there a way to pass an argument to nawk from shell script.
Many thanks... (8 Replies)
Discussion started by: samer.odeh
8 Replies
7. Shell Programming and Scripting
Hello,
Can anyone guide me tin passing parameters into user defined function of shell script (KSH).
Here is my code,
InsertRecord()
{
DB_TBL=$(sqlplus $USERID/$PASSWORD@$DATABASE << EOF
set head off
set feed off
set serveroutput on
INSERT INTO TBL1 ( OLD_VAL,
NEW_VAL,
... (7 Replies)
Discussion started by: Poonamol
7 Replies
8. Shell Programming and Scripting
I need to pass a variable as a parameter from shell script into a DB2 database.
var=bhuk_1123_Q_11/22/09
select * from tbl1 where serial_id='$var';
I have tried executing it using
db2 -tvf scriptname
Somebody please help me out with this. It is throwing an error. Please tell me how... (2 Replies)
Discussion started by: ss3944
2 Replies
9. Shell Programming and Scripting
Hi,
i am new to awk. I am using csv2pipe script(shown below)
BEGIN { FS=SUBSEP; OFS="|" }
{
result = setcsv($0, ",")
print
}
# setcsv(str, sep) - parse CSV (MS specification) input
# str, the string to be parsed. (Most likely $0.)
# sep, the separator between the values.
#
#... (6 Replies)
Discussion started by: bhaskarjha178
6 Replies
10. Shell Programming and Scripting
if
then
# mail -s "Import failed file does not exist" sanjay.jaiswal@xyz.com
echo "FILE does not exist"
exit 1
fi
echo "FILE EXIST"
size=-1
set $(du /export/home/oracle/nas/scott21.dmp.gz)
while
do
echo "Inside the loop"
size=$1
set $(du... (1 Reply)
Discussion started by: sanora600
1 Replies