Post went all funny for some reason... I think this might do the trick but instead of printing ***'s it will just make it so that the password does not show.
Last edited by pilnet101; 04-14-2014 at 11:04 PM..
Unix ps -ef command will show the sqlplus username and password in plain sight, when you run your script that way.
Any other way will require you securing the shell script, but at least the password will not be visible to the ps command. Passwords in a shell script are a security problem. So, if your script is called foo.sh, be sure it resides in a directory that is owned by the same user as the owner of the foo.sh script.
This also requires that the owner is also the uid that runs the script:
Note: SET SERVEROUT ON SIZE nnnnn is only used when you call the dbms_output package in pl/sql. Straight sql does not need set serverout on nnnn. And it is not useful without SIZE nnnnn where n is some large number like 99999.
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
I was trying to replace a string ( for eg - @@asterisk@@ to * ) in variable using
cat $INFILE | while read LINE
do
stmt1=`echo $LINE | sed 's/@@asterisk@@/\*/g'`
stmt=$stmt' '$stmt1
stmt2=`echo $LINE`
STATEMENT=$STATEMENT' '$stmt2
done
echo 'Statement with sed -- > '... (5 Replies)
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)