[SOLVED] Simple question about shell script
by skiende74 from LinuxQuestions.org on (#5KDAD)
I want to do base64 encoding of some string 500 times repeatedly.
So I tried to use for loop, but I'm in trouble.
How do I save the result of base64 operation into variable?
I tried to this, but It didn't work.
k='string'
for i in $(seq 500)
do
k= (echo $k|base64)
done
The problem is 4th line.
echo $k|base64 do work,but k = echo $k|base64 don't work.
How do I save this operation result into k?
So I tried to use for loop, but I'm in trouble.
How do I save the result of base64 operation into variable?
I tried to this, but It didn't work.
k='string'
for i in $(seq 500)
do
k= (echo $k|base64)
done
The problem is 4th line.
echo $k|base64 do work,but k = echo $k|base64 don't work.
How do I save this operation result into k?