0
I’m trying to write a shell script that processes some strings and passes them all by pipe to a for loop, but I’m having trouble getting the iterator through those strings, because I thought that using $* would work. The goal is to be able to create several subfolders with the name of each string.
for i in $(seq 1 30); do
cat /dev/urandom | tr -cd 0-9 | head -c 8 ; echo ;
done |
sed 's/\([[:digit:]]\{3\}\)\([[:digit:]]\{5\}\)/\1-\2/' |
tr '\n' ' ' | for folder in $*; do mkdir diretorio/$folder ; done
It was kind of the solution that ended up leaving me, but I thought there would be some more direct way
– user187831