telegram-bot icon indicating copy to clipboard operation
telegram-bot copied to clipboard

Issue installing bot (sed command)

Open betzerra opened this issue 10 years ago • 4 comments

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?

betzerra avatar Jan 06 '15 17:01 betzerra

Any help @demil133 ?

yagop avatar Jan 06 '15 20:01 yagop

@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! :)

dinigo avatar Jan 07 '15 19:01 dinigo

Has this been resolved?

bb010g avatar Jul 01 '15 01:07 bb010g

Yes, I think so

dinigo avatar Aug 07 '15 11:08 dinigo