When I execute the command screen -S myscreen -X stuff $'search add $1 \015'
from a shell it works perfectly. If I put it in a .sh file and run it as sh /test.sh variablehere
it sends it to screen as $'search add variablehere'
.
Why would it normally work but not from sh
? Im on Ubuntu Server if it matters.
bash != sh
. You can't do fancy stuff in bash and exect it to work the same in a different shell, but you can build and run scripts with bash so it should be an easy fix. – Caleb Aug 22 '11 at 08:09