Reputation: 399
Following my professors exact instructions, I am trying to create a variable named EGG that contains 100 'A's by running this command from my Kali VM:
root@kali:~# EGG='perl -e "print 'A'x100"'
This is my result when attempting to echo the variable:
root@kali:~# echo $EGG
perl -e "print Ax100"
In my professor's demonstration, his variable contained 100 'A's as is expected. Any suggestions on how to fix this?
Upvotes: 0
Views: 81
Reputation: 98388
You need to use back ticks in the shell to capture a command's output.
# EGG=`perl -e "print 'A'x100"`
Upvotes: 7