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
Hi,
Can we use 3 statements convert in a single statement.
First statement output using the second statement and the second statement output using the third statement please let me know the syntax so that I can able to merge all the three statement. (2 Replies)
Discussion started by: Priti2277
2 Replies
3. Shell Programming and Scripting
Hi,
I'm a rookie who is trying to learn this stuff. What I need help with is putting together a non complicated "while" loop within the below "if" statement. I also need the while loop to keep looping until the user types a key to end the loop. Please reveal the proper insertion points. Thank... (4 Replies)
Discussion started by: jefferj54
4 Replies
4. Shell Programming and Scripting
I have the following scenario where I need to use a header record from a file and generate a DML based off of it...
E.g.: The header can change periodically with an additional column in between or remove a col....
Sample header : (head -1 sample.txt)... (17 Replies)
Discussion started by: anduzzi
17 Replies
5. Shell Programming and Scripting
Hi all.
This is my first post on this forum. I've previously found great help in the huge knowledgebase that is here, but this time I have not been able to find a solution to my problem.
I have a large text file that looks like this:
typedef struct ABC_struct_nbr1_ {
char attr1; /*... (0 Replies)
Discussion started by: Yagi Uda
0 Replies
6. Shell Programming and Scripting
Hey guys,
a=`cat abc | wc -l`
b=`cat def | wc -l`
if $a== $b
then
echo "a"
else
echo "b"
fi
I want the if condition to retry itself , untill a==b.
I can't use goto statemt.
Please help.
Thanx in advance.
Please use next time code tags for your code and data (5 Replies)
Discussion started by: jaituteja
5 Replies
7. Shell Programming and Scripting
Hi,
I'm doing a small shellscript which is going to take each line in a "queue file" and do stuff to them. I can do the script easily, but I'd like this one to be a bit prettier.
Consider the following perl statement:
...
foreach my $line (@filedata) {
my ($a, $b, $c) = split(/\t/,... (4 Replies)
Discussion started by: brightstorm
4 Replies
8. Shell Programming and Scripting
I need to pass a DDL statement into a ksh script & parse the statement.
What is the best way to pass a DDL statement into a KSH script.
---------- Post updated at 09:28 AM ---------- Previous update was at 07:35 AM ----------
if the name of the script is test.ksh
test.ksh "ALTER TABLE... (12 Replies)
Discussion started by: gayathree
12 Replies
9. 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
10. UNIX for Dummies Questions & Answers
#!/usr/bin/ksh
echo Please enter
while read n
do
echo $n >> datafile
done
question:
How can I enject an if statement that if the users enter 0 (zero) the program will exit?
this is what I have but not working
#!/usr/bin/ksh
echo Please enter number
while read n
do
if $n=0
then... (2 Replies)
Discussion started by: bobo
2 Replies