I wanted to print a variable(var="phani") to the end of a text file (2.txt) using sed.
This is my work so far:
$ var="phani";echo sed -e "$a$var" -i 2.txt
But the error i am getting is :
sed: -e expression #1, char 2: extra characters after command
Any suggestions please?