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. UNIX for Dummies Questions & Answers
I am having a problem with a nested if. I am sure I am overlooking something. I check for the existence of $Pidfl3 and it exists, o this condition I then want to check for the existence of a next file and remove it. The first if is executed, but on the second if I get test: argument expected.
My... (4 Replies)
Discussion started by: Charles Swart
4 Replies
3. Shell Programming and Scripting
Hi,
i m trying to create script which logic is like below.
if ; then
x=`cat /tmp/testoutput.log | grep STOP | wc -l`
y=`cat /tmp/testoutput.log | grep RUN | wc -l`
if ; then
echo "process stop"
if ; then
echo "process running "
else
echo "file not found"
fi
----------------... (2 Replies)
Discussion started by: tapia
2 Replies
4. UNIX for Dummies Questions & Answers
Hi!!
LookVar=`find . -name "${input}" | wc -w`
if
then
cd $input
rm -f *
ftp -n -i $HostName << EOF
quote USER $User
quote PASS $Password
cd $Path
SoLookVar=`find . -name "${input}" | wc -w`
echo $SoLookVar
if
then
cd $input
mget ./*
bye
EOF
chmod 775 ./* (12 Replies)
Discussion started by: Afsana
12 Replies
5. Shell Programming and Scripting
I'm just having a bit of trouble running this code. It tells me that there's a syntax error on line 29. Any help appreciated.
#!/usr/bin/perl
#
# Phone Book Application
#
%phonebook = (
"Wayne", '34687368',
"Home", '378643287',
"Work", '017374637',
"School",... (2 Replies)
Discussion started by: cabaiste
2 Replies
6. Shell Programming and Scripting
I'm trying to write case statements with 'if statements' embedded inside of them. I'm using the korn shell but it's not functioning.
If I want to see if a string exists in a file and then perform an action, what would be the best way to do this?
For file "asg51fin" to delete a line if a... (1 Reply)
Discussion started by: dazeman27
1 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
In my ksh script, if the conditions of a if statement are true, then do nothing; otherwise, execute some commands.
How do I write the "do nothing" statement in the following example?
Example:
if (( "$x"="1" && "$y"="a" && "$z"="happy" ))
then
do nothing
else
command
command
fi... (3 Replies)
Discussion started by: april
3 Replies
9. Shell Programming and Scripting
Hi -
Trying to take a list of ldap suffixes in a file, run an ldapsearch command on them, then run a grep command to see if it's a match, if not, then flag that and send an email alert.
The list file (ldaplist) would look like -
***********
o=company a
o=company b
***********
**... (7 Replies)
Discussion started by: littlefrog
7 Replies
10. Shell Programming and Scripting
Hi,
I'm trying to implement nested arrays in ksh.
i've the follwing arrays
SRV=\
"SRV1 "\
"SRV2 "
SRV1=\
"MD11 "\
"MD12 "
SRV2=\
"MD21 "\
"MD22 "
MD11=\
"ABC " (5 Replies)
Discussion started by: guysporty
5 Replies