D
D
Dmitriy2019-12-02 15:34:28
linux
Dmitriy, 2019-12-02 15:34:28

How to create files with names given by grep command?

grep "^Be" city.txt | sed 's/ //g'   вот этой командой получаю две строки
BelgradeSerbia1166763
BerlinGermany3671000

How to create files whose names will be these lines?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Shatokhin, 2019-12-02
@dmitriyuvin

grep "^Be" city.txt | sed 's/ //g' | xargs touch

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question