10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am fairly new to writing scripts, and have gotten a lot of help from this site in the past with many of the posts.
I have a question/issue with a script I am attempting to write and have a question regarding executing an sql statement inside of a loop (do while). I have in the past written... (1 Reply)
Discussion started by: josbor01
1 Replies
2. Shell Programming and Scripting
I have a sql statement , i need to assign to a variable in Unix
sel count(*) AS num_files from TABLE_A;
i need to use "num_files" in unix statements. let me know how to assign unix variable to above num_files (1 Reply)
Discussion started by: nani1984
1 Replies
3. Shell Programming and Scripting
The following is my script :
#!/bin/bash
echo "please give app_instance_id"
read app_instance_id
echo "id is $app_instance_id"
export app_id=app_instance_id
sqlplus -s nnviewer/lookup@//nasolora008.enterprisenet.org:1521/LOAD3 @test.sql<<EOF
SPOOL /home/tibco/MCH/Data/qa/raak/name.xls... (4 Replies)
Discussion started by: raakeshr
4 Replies
4. Shell Programming and Scripting
Hi,
I have a requirement to store oracle sqlplus output to some unix variable, count the records and then print the output on the screen.
Can you please point me to any sample program for reference purpose.
Thanks a lot for your time. (0 Replies)
Discussion started by: bhupinder08
0 Replies
5. Shell Programming and Scripting
Hi All,
I have browsed through the forums for a similar topic, but there is no topic which explains about this problem, when the backend is DB2.
I want to assign the output of a select count(*) from tablename to a unix variable in a shell script.
I am using ksh.
The database used to... (3 Replies)
Discussion started by: Siddarth
3 Replies
6. Shell Programming and Scripting
Hi All
I have a requirement where in I am stuck. There is a shell script that is being developed by me. It consist of the sql stmt also. I need to export a variable called HOMEPAGE with a value say www.abc.com. and then use this $HOMEPAGE variable in the sql stmt. My ultimate aim is to fetch all... (1 Reply)
Discussion started by: amitsinha
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have file on below pattern, and i want to write a generic awk to handle all cases.
input_file:
col1~col2~col3~col4~col5~col6
I need to generate 4 files something like this
File1:
col1~~col2~~col3
File2:
col1~~col2~~col4
File3:
col1~~col2~~col5
File4:
col1~~col2~~col6 (1 Reply)
Discussion started by: luckybalaji
1 Replies
8. Shell Programming and Scripting
How to redirect postgresql select query to a variable using shell scripts?
I tried to use
psql -c "select ip from servers" db | egrep '+\.+\+\+' | sed 's/^ *\(.*\) *$/\1/'
Output:
10.10.10.180
10.10.10.181
It display ip addresses from the databasem, but how could i redirect the... (3 Replies)
Discussion started by: uativan
3 Replies
9. UNIX for Dummies Questions & Answers
Need to select count(*) from table to check for zero result in unix script (2 Replies)
Discussion started by: struggle
2 Replies
10. Shell Programming and Scripting
I know htis isnt exactly unix.... but hopefully someone can help me or direct me someplace to get help.
I can run sql queries in scripts against my informix db using:
dbaccess mydb myquery.sql >> sql.output
I need to write my script to select based on todays date. Its very... (5 Replies)
Discussion started by: MizzGail
5 Replies