D
D
Dmitry Levchenko2020-08-08 15:07:27
bash
Dmitry Levchenko, 2020-08-08 15:07:27

How to redirect input from a file (variable) to scanf (bash)?

Good afternoon. I am writing a simple C program and it needs to be tested on various values. The program makes an input request through scanf, and you need to redirect the data from the file to it. I can read the lines, but I don’t understand how to redirect input (for example) from a variable.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AVKor, 2020-08-08
@AVKor

program < file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question