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
Good Morning,
I typically run a batch of commands, from the command line, to process server operating statistics. That would look like this:
(these are days of the month)
In this instance I am processing a directory of file for July 6th 7th etc.
Those files would have names... (9 Replies)
Discussion started by: scotm
9 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
Hi everybody,
I'm sorry If I ask a silly question. I have a simple code like this
I have the following error:
Can anyone explain for me why I have this error, and how can I correct it?
Thanks in advance. (12 Replies)
Discussion started by: Dark2Bright
12 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to write an if statement that will check the USER parm against some text but I'm not quite sure how to use the or switch in the statement.. Can anyone help me out?...
If someone could also let me know when to use ( or if (( $USER != "user1" || "user2" || "user3" || "user4" ))... (6 Replies)
Discussion started by: Jazmania
6 Replies
6. Shell Programming and Scripting
Hi there
I am trying to write an if statement in perl that will return "SUCCESS" if either of these conditions are true
a) if $changes is greater than 5 AND the $force flag is set to 1
OR
b) if $changes is greater than 0 AND $changes is less than 6
#!/usr/bin/perl -w
my $force =... (5 Replies)
Discussion started by: rethink
5 Replies
7. Shell Programming and Scripting
Hi
I have the following case statement:
case $larg in
*_* )
a=${larg%_*}; b=${larg#*_};
;;
*^* )
a=${larg%^*}; b=${larg#*^};
;;
esac
I cannot figure out what *_* and *^* stand for...
Also what a=${larg%_*}; b=${larg#*_}; and
a=${larg%^*}; b=${larg#*^}; ... (1 Reply)
Discussion started by: aoussenko
1 Replies
8. Shell Programming and Scripting
I am writing a Bash script that will either clone a database or setup a standby database. So Parameter 2 will be the operation type. If the value is not clone or standby I want to throw an error message. I suppose I can also do a case block. So far i have been unable to get the syntax working... (1 Reply)
Discussion started by: gandolf989
1 Replies
9. Shell Programming and Scripting
Hi there
We have boxes named server-sybase2, server-oracle1, etc etc
Does any body know how I can construct an if statement to say, if the hostname of the box contains the string "sybase" then do X ie
if
then
X
fi
any help would be greatly appreciated (6 Replies)
Discussion started by: hcclnoodles
6 Replies
10. Shell Programming and Scripting
Hi,
I've a question on awk. In English I want to:
(a) open a file, (b) search through the file for records where length of field15 > 20 characters and (c) print out some fields in the record.
I've written the following and it works OK. The trouble is this will ALWAYS write out the column... (5 Replies)
Discussion started by: eff_cee
5 Replies