H
H
helseggen2019-01-31 14:13:53
linux
helseggen, 2019-01-31 14:13:53

How to pass parameters in a file?

There are two files: the first is a compiled program, the second is a file with parameters. Both are in the same directory. The question is how to run the program with these parameters through the terminal?. Worth Fedora.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2019-01-31
@helseggen

choose:

read PARAMS<params.txt
./myprogram "$PARAMS"

PS It is assumed that your parameters are in one line.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question