10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi there,
Now I'm facing error regarding running shell script via cron.
The shell script which is required to get value from database.
Below is the main part of shell script.
#/bin/bash
#connect to database(1)
db2 connect to $database user xxxx using yyyy
#set values from... (3 Replies)
Discussion started by: Rohan Kishibe
3 Replies
2. Shell Programming and Scripting
Hi,
I want to retrieve the base table name for a table and replace the table with the view name in the file.
I was trying to retrieve the base with the below db2 command but i am getting "1" as return value.
Could you anyone please assist ?
Table_name=system("db2 -x... (4 Replies)
Discussion started by: Nandy
4 Replies
3. UNIX for Advanced & Expert Users
Hi,
Strange problem I'm having here and not sure what to do.
I have here a xml that is supposed to execute the next value in the schema but it isn't do the job it's supposed to do. I'm not a dba or a developer so I'm sorry in advance if there are some things i don't understand.
when we run... (5 Replies)
Discussion started by: techy1
5 Replies
4. Shell Programming and Scripting
Hello to all,
May be some expert could help me.
I have the below awk script that works correctly in Cygwin:
awk -F\" 'FNR==NR && FNR>1 {gsub(",","",$5); N=$5;next}
$10 in N && FNR>1 {
Y=$8
Z=(N==$8)?"Yes:"No";
}
END{
for(k in N) {print k,Y,N,Z?Z:"Not_Found"}
}' file2 file1But when I... (11 Replies)
Discussion started by: Ophiuchus
11 Replies
5. Shell Programming and Scripting
Hi guys I have a problem with one module of my script. It's awk script running in pbs file - It's working when I make a call from pbs to separate awk only file like this but when I try to execute this code in pbs file it fails
awk 'BEGIN { max = -1000; min = 1000 }
{
{$4 == "TCO"}
... (2 Replies)
Discussion started by: grincz
2 Replies
6. Shell Programming and Scripting
Hi,
I would be really thankful, if anyone could help me out with this,since i am very new to this shell scripting.
I have 6 sql scripts that i am trying to run in unix across db2.
i want the scripts to be executed as follows,
script_1 should be executed first.
Then... (4 Replies)
Discussion started by: jnimz
4 Replies
7. Shell Programming and Scripting
Hi there,
I am trying to write a shell script as root on AIX 5.3 where I change user to db2inst1, connect to our db2 database, run a sql select query and export the result of the query to a file.
The code I have so far is as follows:-
#!/usr/bin/ksh
su - db2inst1 -c "db2 connect to... (0 Replies)
Discussion started by: candlino
0 Replies
8. UNIX for Advanced & Expert Users
Hello All,
After login to the server we are explicitly calling /usr/local/bin/bash to activate bash shell properly.
But since commands are not executing properly so I think it is not initialized well. I am facing following problems:
1) If I want to have a look on a particular file using tail... (6 Replies)
Discussion started by: abhishek0071
6 Replies
9. UNIX for Advanced & Expert Users
Hi Everyone,
I am required to write an AWK script that can be run from any directory.
This script finds subscription rates for each subscriber at an interval of 10 mins. I want that just by copy pasting the whole script in shell prompt and giving the input arguments, script must work. Currenty... (4 Replies)
Discussion started by: rachana8p
4 Replies
10. UNIX for Dummies Questions & Answers
Hi, I need help again. When I run this shell script, it only runs the unld_date.sql piece and exits. How can I structure this to run all the way to the end? When I don't have the unld_date.sql piece in here, everything runs fine from the date compare piece all the way to the end. Thanks in... (5 Replies)
Discussion started by: siog
5 Replies