10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
2. Shell Programming and Scripting
Hi There,
I am trying to load data from a csv file into a DB during our DB migration phase. I am successfully able export all data into a .csv file but those have to rewritten in terms insert statement which will allow for further population of same data in different DB
My exiting csv record... (6 Replies)
Discussion started by: bhaskar_m
6 Replies
3. Shell Programming and Scripting
Hi all, i am writing a shell script in which i got stuck when tried to use a if statement.
This is my code :
#!/bin/sh
today=`date +"%a %b %e"`
find /prod/logs -name '*.log' -mtime 0 -exec cp {} /home/hzjnr0/test \;
find /home/hzjnr0/test -type f -exec grep -i "successfully" {} \; >... (6 Replies)
Discussion started by: Soma Das
6 Replies
4. Shell Programming and Scripting
Hi,
I want to be able to check if a variable is not equal to null. I am using KSH, and am getting this error message when i run this script:
: assignment requires lvalue
The line which is causing the problem is as follows:
if (($SFTP_DESTINATION != '' ));then
if ssh... (6 Replies)
Discussion started by: Jack_Maloney
6 Replies
5. Shell Programming and Scripting
Hi
What is the syntax for if statement using && and || operator?
if && ] ||
here its giving me an error to this if statement
any suggestion?? (2 Replies)
Discussion started by: Avi
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
How do you echo something once when a find statement returns null results?
This is when using mutiple locations and mutiple arguments.
The below find command the inner loop of a nested for loop where the outter loop holds the $args and the inner loop holds the locations.
find... (2 Replies)
Discussion started by: tchoruma
2 Replies
7. Shell Programming and Scripting
Hi All,
I am using Unix ksh script.
I need to insert values to a table using the o/p from a slelect statement.
Can anybody Help!
My script looks like tihs.
---`sqlplus -s username/password@SID << EOF
set heading off
set feedback off
set pages 0
insert into ${TB_NAME}_D... (2 Replies)
Discussion started by: nkosaraju
2 Replies
8. Shell Programming and Scripting
I have one file name start.sh in rinku directory. I want to move it to rinku1 directory. I also mantain log file. In the log file I want to write the the statement whenever the move is failed.
Example:
>echo `mv /rinku/me.tx ../rinku1` | tee -a log1
mv: me.tx: cannot access: No such file or... (5 Replies)
Discussion started by: rinku
5 Replies
9. Shell Programming and Scripting
Okay i've got some code which reads a text file and loops through it and there a few if statements inside where one is failing (the one bolded).
Basically the acc column contains a list of three digit access codes, some though have null records (i.e nothing in the field) so what I want to do is... (3 Replies)
Discussion started by: TonyR
3 Replies
10. Shell Programming and Scripting
Hi all,
I want to check if the first or the second or the third argument of call to a shell script is empty.
How do i do that in a short way. I watched some examples and i believe
if checks if an argument is NULL.
If so, how can i add the checks for argument 2 and 3 in the statement?
... (1 Reply)
Discussion started by: aukequist
1 Replies