Hi..
I am a total newbie to writing scripts. I am trying to execute a program through a script, but I keep getting 'unexpected end of file' error.

q=1.170
while [ $q -lt 1.405 ]; do
./a.out $q
q = $(($q + 0.005))
done

Please tell me the correct way to do this.

Recommended Answers

All 2 Replies

this script still complains about the use of -lt because that expects integers

#!/bin/sh
q=1.170
while [ $q -lt 1.405 ]; do
echo $q
q = $(( $q + 0.005 ))
done

okay... thanks...
I can make changes in my program for that.... But, is there any way to work with the floating point values??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.