telegram-bot
telegram-bot copied to clipboard
Issue installing bot (sed command)
Hi,
After running sed -i "s/yourusername/$(whoami)/g" etc/telegram.conf
I get: sed: 1: "etc/telegram.conf": invalid command code e
.
Any ideas?
Any help @demil133 ?
@betzerra, are you using Mac? Apparently BSD implementation of sed
is slightly different from the GNU one which we use on linux, as they point out in http://stackoverflow.com/questions/4247068/sed-command-failing-on-mac-but-works-on-linux
Adding a backup extension for a backup file seems to get the BSD version working.
sed -i.bak "s/yourusername/$(whoami)/g" etc/telegram.conf
This will create a backup version in etc/telegram.conf.bak
Same thing with the path substitution (which uses different separators to avoid problems with the path)
sed -i.bak "s_telegrambotpath_$(pwd)_g" etc/telegram.conf
If this doesn't work, please, provide more information. I hope it helps! :)
Has this been resolved?
Yes, I think so