10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Team
I have files in different directories . How can i take the count of latest file and insert into Db2 table .
I am using
awk 'END{print NR+1-ARGC}' (File name)
to get the counts.
How can i take
1.The count of latest file
2.Insert into Db2 table( File Name and Counts) .
cd... (4 Replies)
Discussion started by: Perlbaby
4 Replies
2. Shell Programming and Scripting
Hi,
I'm writing a script that connects through ssh (using "expect") and then is supposed to find whether a process on that remote machine is running or not. Here's my code (user, host and password are obviously replaced with real values in actual script):
#!/usr/bin/expect
set timeout 1... (3 Replies)
Discussion started by: oseri
3 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
Hi All,
I have list of 100 table names in a file, how to read table name from and pass to DB2 export command and run for all tables in loop.
Please help me with script.
db2 EXPORT TO ~/data_export/<table name from file>.ixf OF IXF MESSAGES messages.txt "SELECT * FROM ITG.<Table Name... (4 Replies)
Discussion started by: srimitta
4 Replies
5. 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
6. Shell Programming and Scripting
Hi,
I need to get the value from the table using the sql command and store this value into the unix variable so that i can use this value for furthure use..
Please can any body help me in this regards
Thanks & Regards
Abdul Hafeez Shaik (17 Replies)
Discussion started by: abdulhafeez
17 Replies
7. Shell Programming and Scripting
Hi, I've just started on unix shell scripting a few days ago. I tried look for the solution to my problem over the net but to no avail.
The objective of my script is to count the number of records in a particular table from a Oracle database.
Ok, here's my problem, when I run this script:
... (1 Reply)
Discussion started by: mervinboyz
1 Replies
8. 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
9. Shell Programming and Scripting
Guys Quick help...
----------------------------
#!/usr/bin/ksh
db2 -x "select count(*) from ${SCHEMA}.EMP"> $HOME/count.dat
COUNT=`cat $HOME/count.dat`
echo Table Count: $COUNT
if ( $COUNT -eq 0 ); then
echo Record Count in Table is 0
exit 1
fi
echo Records Exist... (2 Replies)
Discussion started by: freakygs
2 Replies
10. Shell Programming and Scripting
Hi,
Could anybody help me how can I assign the value of "select count(*) from table1" to a variable in an unix shell script. Thanks. (4 Replies)
Discussion started by: nguda
4 Replies