I've used mkdir to create a parent folder with an additional 10 child folders using mkdir -p parent\child{1..10}. I now need to create a txt file in each of these 10 child folders as (name of parent folder).txt
I cannot use touch command as each text document also needs to have a line of text in.
My original idea was to create a loop which would make each child folder and txt file with the specified line of text individually 10 times. I figured this would be inefficient.
I can create all 10 child folders and the parent folder with a single command. How would I go about creating the text files in an efficient manner with the line of text? Or was my original idea the best way to go about it?