gawk command not found csh script loop iteration ubuntu desktop x64 10.04
I am using Ubuntu Desktop x64 10.04 on a HP Proliant ML350 G6 Server.
I am executing a simple csh script which uses gawk to process some strings.
Inside the script there is a loop section, which uses gawk repeteadly.
After "some sucessful executions" i recieve a "GAWK: COMMAND NOT FOUND" Error Message and the script crashes.
I don't undertand why at the begining of the execution everything goes fine, but after some iterations the "GAWK" Command "DISAPPEARS".
The next csh script ilustrates my problem:
#! /bin/csh -f
echo $0 ">>" `date`
echo $0 ">>" `date` > reporte
set c = 1
set cc = 0
while ($c < 5)
@ cc++
set a = `echo hola | gawk '{print $1}'`
if ($a == "") then
echo error $c paso $cc
echo error $c paso $cc >> reporte
@ c++
endif
end
echo $0 ">>" `date`
echo $0 ">>" `date` >> reporte
Here is the outpu for one execution:
ubuntu-test.csh >> Wed Jan 19 11:19:17 ECT 2011
error 1 paso 23429
error 2 paso 23913
error 3 paso 26982
error 4 paso 29193
ubuntu-test.csh >> Wed Jan 19 11:20:07 ECT 2011
Basically, this script counts the number of iterations needed to produce the "ERROR". It's interesting to notice that "GAWK" disappears for a while, but re-appears after some other iterations.
It's a real problem for me because I use gawk in many scripts for many tasks. I have used Suse and CentOS distributions before with the same script and I have never got this problem. I really want to use Ubuntu because has a lot of features i need.
I hope you can help me.
Thanks in advance.
Att, Jose.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu gawk Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- José de la Bastida
- Solved:
- Last query:
- Last reply: