I know that someone already ask for something similar but I haven't been able to use that commands in a remote host. I have the bash:
#!/bin/bash
IMSI="732111030120252"
ssh openbts@192.168.10.12 bash -c " '
sed -i '61,$d' /etc/asterisk/sip.conf #erase the lines fron 61 to end of the file sip.conf
sed -i '288,$d' /etc/asterisk/extensions.conf
echo "[IMSI$IMSI].(sets)" >> /home/openbts/Desktop/Prueba #Write that expression inside Prueba (Ignore .)
' "
However, he is considering $d
and ()
like locals variables and not like part of the sed and echo commands.
I found that you can use \\\$d
or all the line inside an echo, but they arent working.
Anyone have an idea?? Thank you