The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Windows & DOS: Issues & Discussions
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-11-2009
karthiksrao karthiksrao is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 1
unix script and unix2dos conversion

Hi,
I am a newbie and do not have much experience using unix. But I have been trying to understand it. I found the following unix script

typeset -i n=0

while [! -s vel.txt]
do
sleep 5
echo "${n}:Fluent is running...."
n=${n}+1
done

I have the following doubts:
1) In the first line - I am aware that we are defining a variable n and setting its value to zero. What does the '-i' do ?

2) Does the while loop say that while vel.txt does NOT exist, keep printing "Fluent is running..." ? What does the '-s' stand for?

3) I need to convert this to DOS batch script..
Is the following, a correct translation ?

SET n=0
WHILE NOT vel.txt
DO
SLEEP 5
ECHO "%{n}% : Fluent is running..."
n = %{n}% + 1
DONE

Any help will be much appreciated.


Thanks