Tag Info

New answers tagged


This worked for me: xargs mkdir <list.txt This works because if you give multiple arguments to mkdir it will happily create all the directories it can create. xargs simply "flattens" your text file by replacing newlines with spaces, thereby invoking mkdir with a long list of arguments containing all your directory names at once instead of one at a ...


This code worked very will for me: #!/bin/bash while read i; do echo "$i" wait mkdir "$i" done < lis.txt


In your example, your confusing shell scripting commands. You have to pay special attention to which scripting language you're using and then adhere to its commands' syntax. In your example you're using turbo C shell (tcsh) however you're then mixing in Bash/Bourne shell commands and syntaxes. You can use the following approach if you truly want tcsh. Say ...


You don't need a loop. You can do: mkdir `sed 's/^/<name_id>/' <path to list.txt>/list.txt`

Top 50 recent answers are included