I want to remove the white spaces from a variable in Linux Shell and echo it on the terminal.
Following is my code:
echo "Enter your full name"
$fname | sed "s/ //g"
You can't just call a variable (think of it as just a string value container). You need to
echo $fname | sed "s/ //g"