My current directory structure
├── index.html
├── src
│ └── App.js
└── README.md
Now, I wanted to create files App.js
, Body.js
and Footer.js
in a new directory named components
. So, my final structure will be:
├── index.html
├── src
│ ├── App.js
│ └── components
│ ├── Header.js
│ ├── Body.js
│ └── Footer.js
└── README.md
I tried something like this:
mkdir -p src/components && touch $_/Header.js
touch src/components/Body.js src/components/Footer.js
From reference, I know to create multiple files at once, we can use
touch newfilename{1..N}
But, my filenames are having different names.
Is there a way to create all these files in a new directory using a single command with terminal?