I have a command nested in some while loops to parse some data that looks something like this.
On the first loop, the command is executed properly (and takes maybe 10 seconds to finish). But on all subsequent loops, something happens and the command is not executed properly. I know this because the data I expect does not get output to "out_file" and the process takes a split second, whereas it should take the usual 10 seconds.
To make sure the command is not getting messed up during the looping, I put an echo just before the command is executed, so it looks like this.
The echo gives me what I expect.
If I run those 3 commands in a row at the prompt manually, I get the results I expect. But inside the script, only the first loop of the command gets the results. Any ideas what could be happening?
I have a command nested in some while loops to parse some data that looks something like this.
On the first loop, the command is executed properly (and takes maybe 10 seconds to finish). But on all subsequent loops, something happens and the command is not executed properly. I know this because the data I expect does not get output to "out_file" and the process takes a split second, whereas it should take the usual 10 seconds.
To make sure the command is not getting messed up during the looping, I put an echo just before the command is executed, so it looks like this.
The echo gives me what I expect.
If I run those 3 commands in a row at the prompt manually, I get the results I expect. But inside the script, only the first loop of the command gets the results. Any ideas what could be happening?
Thanks,
hobbers
Do the following and prvide me with your feedback please:-
I have if loop with multiple variable value check in if loop. How can i print only if loop satisfied variable and its value in shell script ? I dont want to check each variable in if loop. That makes my script larger.
if ]
then
echo "Only satisfied variable with value"
... (3 Replies)
Hi,
i have a source file and have 3 columns and separated by "|" .i want to split this 3 columns in different variable.When i am executing this values indivisually giving correct result but when the same execute inside a for loop,it's giving issues.
Src file(jjj.txt)
-------... (8 Replies)
Hi ,
Please excuse me for opening a new thread i am unable to find out the syntax error
in my if else condition inside for loop in awk command ,
my actual aim is to print formatted html td tag when if condition (True) having string as "failed",
could anyone please advise what is the right... (2 Replies)
I have an input file at ./$1.txt
with content of seq numbers like :
1234567890
1234589700
.
.
so on..
I need to take each seq nbr from the input file ,run the query below:
select ackname,seqnbr from event where event_text like '%seqnbr( from the input file)'
and redirect the... (11 Replies)
I tried this:
for region in 'raj' 'kt' 'kol' 'krl' 'chn' 'dl' 'hr' 'bih' 'ap'
do
sqlplus -s huw$region/`echo $region`huw#321@huw$region<<!
set serveroutput on
begin
select count(*) from tcd_preferred_cust_201109
end;
/
exit;
done
but the error shows like:
Syntax error at line 4 :... (1 Reply)
Hi all
I run my program prog.c in the following way :
$ ./prog 1 > output.txt where 1 is a user defined initial value used by the program.
But now I want to run it for many a thousand initial values, 1-1000, and store all the outputs in different files.
Like
$ ./prog 1... (1 Reply)
in one of my script..I have some thing like
john:christina : one::
and i want to make it like
john:chritina:two:(date command):jackey:
basically change 'one' to 'two' and run date :command and add other name: (30 Replies)
below is the output where i'm getting the same times tamp throughout the loop., where i'm expecting that to log the current time stamp..
C:\Users\ilango>for /l %i in (1,1,5) do echo for %i
C:\Users\ilango>echo for 1
for 1
C:\Users\ilango>echo for 2
for 2
C:\Users\ilango>echo... (1 Reply)