M
M
Maxim2019-05-14 23:15:35
bash
Maxim, 2019-05-14 23:15:35

How to iterate through pairs of files?

The folder contains input*.txt and output*.txt files, where * is a number. Their equal number. The first one may be without a number.
How to loop through these pairs in bash?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2019-05-15
@Got_Oxidus

How to loop through these pairs in bash?

For example like this:
for INPUT in input*.txt ; do
  OUTPUT=output${INPUT#input}
  ...
done

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question