Tag Info

New answers tagged

1

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 ...


-2

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


2

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 ...


0

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