SyntaxFix
Write A Post
Hire A Developer
Questions
Use command substitution like this:
line=$(sed -n '2p' myfile) echo "$line"
Also note that there is no space around the = sign.
=