java program to run a C compiled file in SHELL unix

hi,

i have two queries,

1) i have a c program which i compile to get a new file,{a exe file i suppose}, i need to execute it for 2000 times. for that i need to write a java program which can run the file in SHELL unix.

can you suggest me how to write,

2) also my file name starts with 0001.mnp to 1989.mnp, how to get 0001 as a number and during increment it should generate as 0002 ..0038 and so on. till 1989.

the above java program which am goin to write should just take file 0001.mnp and convert it into 0001.bns,

and get incremented automatically till the file 1989.

[615 byte] By [prasadgunasa] at [2007-11-27 6:08:03]
# 1

> hi,

> i have two queries,

>

> 1) i have a c program which i compile to get a new

> file,{a exe file i suppose}, i need to execute it for

> 2000 times. for that i need to write a java program

> which can run the file in SHELL unix.

>

> can you suggest me how to write,

Read this: http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

However, you could do this all in a shell script.

>

> 2) also my file name starts with 0001.mnp to

> 1989.mnp, how to get 0001 as a number and during

> increment it should generate as 0002 ..0038 and so

> on. till 1989.

>

> the above java program which am goin to write should

> just take file 0001.mnp and convert it into

> 0001.bns,

> and get incremented automatically till the file 1989.

A loop? What are you having difficulty with?

Again, this could all be done in a shell script.

jbisha at 2007-7-12 17:09:54 > top of Java-index,Java Essentials,Java Programming...
# 2
>1) i have a c program which i compile to get a new file,{a exe file i suppose}No, on Unix the file system stores the permission which declares a file executable. It does not have to adhere to any naming convention in order to become magically executable.
BIJ001a at 2007-7-12 17:09:54 > top of Java-index,Java Essentials,Java Programming...