Skip to content
Advertisement

How to write shell script,to automate file conversion?

I have 30 files(ascii),which I want convert to binary.Linux command line(FORTRAN 77 CODE) that has been compiled

JavaScript

Relevant part of the code

JavaScript

Then code asks for input and output file names

JavaScript

How to automate this?I have tried like this

JavaScript

Or

JavaScript

But I do not have a clue for next step.Text files are

JavaScript

Output files

JavaScript

Advertisement

Answer

Try this:

JavaScript

The variable op_file converts your rec01.txt to rec.01.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement