G
Getut
Guest
I have grep output that give me lines of text that I want to use as subfolder names and create the folders with mkdir. The grep portion is working and giving me the output I need. It is basically a string that exists before the first and only comma in each line of a text file.
How can I iterate through those lines and build folders.. pseudo code below:
mkdir -p rootfolder/(line1 of grep output)
mkdir -p rootfolder/(line2 of grep output)
etc.
Code:
grep -o '^[^,]*' textfile
How can I iterate through those lines and build folders.. pseudo code below:
mkdir -p rootfolder/(line1 of grep output)
mkdir -p rootfolder/(line2 of grep output)
etc.