Hi, I am stumped as to why the follow command does not work.
I have tried the command on a couple different linux distro's and it does not save the word hello in the name variable. Odd thing is it doesn't return a error either, it returns the prompt which leads me to believe it worked but when I echo the variable $name, nothing is saved in it.
Code:
echo hello | read name
I have tried the command on a couple different linux distro's and it does not save the word hello in the name variable. Odd thing is it doesn't return a error either, it returns the prompt which leads me to believe it worked but when I echo the variable $name, nothing is saved in it.