The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 03-13-2008
varungupta varungupta is offline
Registered User
  
 

Join Date: Feb 2007
Location: Pune, Dehradun (INDIA), Michigan(US)
Posts: 206
Lightbulb

Quote:
Originally Posted by varungupta View Post
Hey,

I have a dummy script that is the base for the above script where I am getting the problem of syntax.
Dummy script is working fine and is given below, but i dont know why the actual script is not working :

-------------------------------------------------------------------
for var in 1 2
do

echo "var : $var"

count=0
while [ "$count" -lt 3 ]
do
echo "count : $count"

awk 'BEGIN { i = 0
f(i)
}
function f(para)
{
if ( para < 10 )
{
print "\n value of para : " para ;
para += 1 ;
f(para) ;
}
else
{
print "\n inside else, before increment, para : " para ;
para += 1 ;
print "\n inside else, para : " para ;
exit ;
}
}
'
let "count += 1"
done
done

-------------------------------------------------------------------

Please have a look and suggest any solution to the problem.
Thanks to all the unix bonds.

Varun Gupta.


Please provide some suggestion on this !!