Home > Archive > Unix Programming > August 2006 > read/execute a file
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
read/execute a file
|
|
| ganesh 2006-08-23, 4:00 am |
| hi all
i compile some fortran subroutines to create .o files and then create
an executable file called 'main' using following command. (hp unix)
" f90 -o main mainmod.o main.o addstf.o dcoup.o impedance.o
sourcnods.o thdfe.o calban.o der3ds.o inputj.o redvk.o st4r8.o
trifac.o damper.o fnct.o solstp.o step.o"
each time when i want to create the main.exe file i need to write the
whole thing at the command prompt.
is it possible to save this text in a txt file and read/call/execute
this txt file to execute the command/contents in it?
many thanks for help
| |
| Herbert Pophal 2006-08-23, 4:00 am |
| ganesh wrote:
> hi all
> i compile some fortran subroutines to create .o files and then create
> an executable file called 'main' using following command. (hp unix)
> " f90 -o main mainmod.o main.o addstf.o dcoup.o impedance.o
> sourcnods.o thdfe.o calban.o der3ds.o inputj.o redvk.o st4r8.o
> trifac.o damper.o fnct.o solstp.o step.o"
>
> each time when i want to create the main.exe file i need to write the
> whole thing at the command prompt.
You can write this command into a file which you invoke as a shell
script. Especially when you are creating software you could use the
'make' utility or the like. If your system contains 'f90' why doesn't it
contain 'make'? Or does it? Give it a try.
> is it possible to save this text in a txt file and read/call/execute
> this txt file to execute the command/contents in it?
Well, write this command into a file, for example 'linkit', set this
file executable, and call it by its name: './linkit', depending on your
PATH settings.
Keywords: shells script, make, makefile
HTH
Herbert
| |
| Paul Pluzhnikov 2006-08-23, 8:01 am |
| Herbert Pophal <pophal@zrz.tu-berlin.de> writes:
> ganesh wrote:
[color=darkred]
> Keywords: shells script, make, makefile
In addition, please learn to cross-post instead of multi-posting,
and please do not top-post.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
|
|
|
|
|