What is this script use for? [closed]
Clash Royale CLAN TAG#URR8PPP
up vote
-4
down vote
favorite
for m in 1..100
do
r1=`shuf -n1 -i1-100`
r2=`shuf -n1 -i1-100`
if [[ "$r1" -lt "$r2" ]]
then
resstr=`echo "$m" | md5sum | cut -b $r1-$r2`
else
resstr=`echo "$m" | md5sum | cut -b $r2-$r1`
fi
str="."
for n in `echo $resstr|fold -w1`
do
str="$str/`shuf -n5 -i100-500| tr -d 'n'|md5sum |cut -b1-6`"
done
echo "mkdir -p $str"
done
I tried to run it locally but ran into errors. Can someone explain what this does and how is this useful please?
bash scripting
closed as off-topic by jasonwryan, muru, Kusalananda, Vlastimil, Kiwy Apr 10 at 9:04
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." â muru, Kusalananda, Vlastimil, Kiwy
add a comment |Â
up vote
-4
down vote
favorite
for m in 1..100
do
r1=`shuf -n1 -i1-100`
r2=`shuf -n1 -i1-100`
if [[ "$r1" -lt "$r2" ]]
then
resstr=`echo "$m" | md5sum | cut -b $r1-$r2`
else
resstr=`echo "$m" | md5sum | cut -b $r2-$r1`
fi
str="."
for n in `echo $resstr|fold -w1`
do
str="$str/`shuf -n5 -i100-500| tr -d 'n'|md5sum |cut -b1-6`"
done
echo "mkdir -p $str"
done
I tried to run it locally but ran into errors. Can someone explain what this does and how is this useful please?
bash scripting
closed as off-topic by jasonwryan, muru, Kusalananda, Vlastimil, Kiwy Apr 10 at 9:04
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." â muru, Kusalananda, Vlastimil, Kiwy
2
What were the errors?
â Kusalananda
Apr 10 at 8:24
OP probably ran the script on a POSIX shell instead of a bash shell.
â dsstorefile1
Apr 10 at 8:27
this script is very pointless it isn't just homework ?
â Kiwy
Apr 10 at 8:29
3
Cross-posted: askubuntu.com/questions/1023571/â¦
â muru
Apr 10 at 8:46
add a comment |Â
up vote
-4
down vote
favorite
up vote
-4
down vote
favorite
for m in 1..100
do
r1=`shuf -n1 -i1-100`
r2=`shuf -n1 -i1-100`
if [[ "$r1" -lt "$r2" ]]
then
resstr=`echo "$m" | md5sum | cut -b $r1-$r2`
else
resstr=`echo "$m" | md5sum | cut -b $r2-$r1`
fi
str="."
for n in `echo $resstr|fold -w1`
do
str="$str/`shuf -n5 -i100-500| tr -d 'n'|md5sum |cut -b1-6`"
done
echo "mkdir -p $str"
done
I tried to run it locally but ran into errors. Can someone explain what this does and how is this useful please?
bash scripting
for m in 1..100
do
r1=`shuf -n1 -i1-100`
r2=`shuf -n1 -i1-100`
if [[ "$r1" -lt "$r2" ]]
then
resstr=`echo "$m" | md5sum | cut -b $r1-$r2`
else
resstr=`echo "$m" | md5sum | cut -b $r2-$r1`
fi
str="."
for n in `echo $resstr|fold -w1`
do
str="$str/`shuf -n5 -i100-500| tr -d 'n'|md5sum |cut -b1-6`"
done
echo "mkdir -p $str"
done
I tried to run it locally but ran into errors. Can someone explain what this does and how is this useful please?
bash scripting
edited Apr 10 at 8:21
Kusalananda
102k13200317
102k13200317
asked Apr 10 at 8:19
Nish
11
11
closed as off-topic by jasonwryan, muru, Kusalananda, Vlastimil, Kiwy Apr 10 at 9:04
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." â muru, Kusalananda, Vlastimil, Kiwy
closed as off-topic by jasonwryan, muru, Kusalananda, Vlastimil, Kiwy Apr 10 at 9:04
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question has been posted on multiple sites. Cross-posting is strongly discouraged; see the help center and community FAQ for more information." â muru, Kusalananda, Vlastimil, Kiwy
2
What were the errors?
â Kusalananda
Apr 10 at 8:24
OP probably ran the script on a POSIX shell instead of a bash shell.
â dsstorefile1
Apr 10 at 8:27
this script is very pointless it isn't just homework ?
â Kiwy
Apr 10 at 8:29
3
Cross-posted: askubuntu.com/questions/1023571/â¦
â muru
Apr 10 at 8:46
add a comment |Â
2
What were the errors?
â Kusalananda
Apr 10 at 8:24
OP probably ran the script on a POSIX shell instead of a bash shell.
â dsstorefile1
Apr 10 at 8:27
this script is very pointless it isn't just homework ?
â Kiwy
Apr 10 at 8:29
3
Cross-posted: askubuntu.com/questions/1023571/â¦
â muru
Apr 10 at 8:46
2
2
What were the errors?
â Kusalananda
Apr 10 at 8:24
What were the errors?
â Kusalananda
Apr 10 at 8:24
OP probably ran the script on a POSIX shell instead of a bash shell.
â dsstorefile1
Apr 10 at 8:27
OP probably ran the script on a POSIX shell instead of a bash shell.
â dsstorefile1
Apr 10 at 8:27
this script is very pointless it isn't just homework ?
â Kiwy
Apr 10 at 8:29
this script is very pointless it isn't just homework ?
â Kiwy
Apr 10 at 8:29
3
3
Cross-posted: askubuntu.com/questions/1023571/â¦
â muru
Apr 10 at 8:46
Cross-posted: askubuntu.com/questions/1023571/â¦
â muru
Apr 10 at 8:46
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
The script, which assumes bash
or some other shell that does brace expansions, and that GNU coreutils is installed, outputs mkdir
commands for creating some sort of directory structure where there directories have names from MD5 checksums calculated on random numbers.
Whether this is useful or not, I don't know. There's no immediate error in the script except for a few style issues and unquoted variable expansions.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
The script, which assumes bash
or some other shell that does brace expansions, and that GNU coreutils is installed, outputs mkdir
commands for creating some sort of directory structure where there directories have names from MD5 checksums calculated on random numbers.
Whether this is useful or not, I don't know. There's no immediate error in the script except for a few style issues and unquoted variable expansions.
add a comment |Â
up vote
1
down vote
The script, which assumes bash
or some other shell that does brace expansions, and that GNU coreutils is installed, outputs mkdir
commands for creating some sort of directory structure where there directories have names from MD5 checksums calculated on random numbers.
Whether this is useful or not, I don't know. There's no immediate error in the script except for a few style issues and unquoted variable expansions.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The script, which assumes bash
or some other shell that does brace expansions, and that GNU coreutils is installed, outputs mkdir
commands for creating some sort of directory structure where there directories have names from MD5 checksums calculated on random numbers.
Whether this is useful or not, I don't know. There's no immediate error in the script except for a few style issues and unquoted variable expansions.
The script, which assumes bash
or some other shell that does brace expansions, and that GNU coreutils is installed, outputs mkdir
commands for creating some sort of directory structure where there directories have names from MD5 checksums calculated on random numbers.
Whether this is useful or not, I don't know. There's no immediate error in the script except for a few style issues and unquoted variable expansions.
edited Apr 10 at 8:47
answered Apr 10 at 8:34
Kusalananda
102k13200317
102k13200317
add a comment |Â
add a comment |Â
2
What were the errors?
â Kusalananda
Apr 10 at 8:24
OP probably ran the script on a POSIX shell instead of a bash shell.
â dsstorefile1
Apr 10 at 8:27
this script is very pointless it isn't just homework ?
â Kiwy
Apr 10 at 8:29
3
Cross-posted: askubuntu.com/questions/1023571/â¦
â muru
Apr 10 at 8:46