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)
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)
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)
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)
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)
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)
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)
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)
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)
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)