-bash-3.2$ cat sed
A
B
C
D
-bash-3.2$ sed -i '$ a\sedtest' sed
sed: illegal option -- i
-bash-3.2$
I cant use { echo "sedtest" >> sed }
-bash-3.2$ cat sed A B C D -bash-3.2$ sed -i '$ a\sedtest' sed sed: illegal option -- i -bash-3.2$
Any solution using awk/perl/sed?