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
have written the below code to check whether the string received from user is a file name or dir using case statement, but its going into default case*).
#!/bin/sh
#Get a string from user and check whether its a existing filename or not
rm str2
rm str3
echo "enter a file \c"
read fil... (8 Replies)
Discussion started by: Mohan0509
8 Replies
3. Shell Programming and Scripting
Hello,
I have a ksh script that uses code below. For some reason it works under linux but fails in unix. Any idea why?
if ]; then ...
Thanks (9 Replies)
Discussion started by: rdogadin
9 Replies
4. 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
5. UNIX for Dummies Questions & Answers
Hi,
I have the following basic script. However, the statement (line 5) is not work. The output data is not able to set my request format a30. Any advise? :mad:
echo " Column filename format a30"|sqlplus4
echo Input file list to check:
read filelist
for file in `cat $filelist.txt`
do... (1 Reply)
Discussion started by: happyv
1 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have a script to get the information from database, however, it's look like the loop is not work, can someone help? :confused:
echo Input file list to check:
read filelist
for file in 'cat $filelist.txt'
do
echo "select FILENAME from FILE_TABLE where filename like '${file}'%;" >>... (9 Replies)
Discussion started by: happyv
9 Replies
7. UNIX for Dummies Questions & Answers
Hi, this is my first post. Although I have already read through the Forum Rules, please pardon me if I violate anything.
I am trying to perform an if statement to check if a SET of files exist, and if they do, I would like to move them else where:
$DIRECTORY_1
if ls filename*.txt
then
mv... (5 Replies)
Discussion started by: silvermission
5 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a script like below :
#!/bin/ksh
echo "Do you want to export all docs ?"
read alld
echo "Do you want to export template or report only "
read temr
case && ]
#arguments
;;
case && ]
#arguments
;;
case && ]
#arguments
;; (4 Replies)
Discussion started by: luna_soleil
4 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
I am a newbie, so please let me know if there is a better way to do this. I coded a perl script, that scans a Unix script and picks out certain strings (strings that precede ".log"). However I want to limit the strings it picks up based on the "If statements" in the unix script.
... (0 Replies)
Discussion started by: syera123
0 Replies
10. Shell Programming and Scripting
Hi all,
How can i use the below unix command in AWK . Can any one please suggest me how i can use.
sed -e "s/which first.sh/which \$0/g" $shell > $shell.sal
where $0=current program name(say current.sh)
$shell=second.sh (1 Reply)
Discussion started by: krishna_gnv
1 Replies