Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send multiline commands #316

Closed
nl0pvm opened this issue Nov 6, 2014 · 5 comments
Closed

Unable to send multiline commands #316

nl0pvm opened this issue Nov 6, 2014 · 5 comments

Comments

@nl0pvm
Copy link

nl0pvm commented Nov 6, 2014

In the old version it was possible to send multi line commands this way:

/home/user/tg/bin/telegram-cli -k /home/user/tg/tg-server.pub -u user -v <<STDIN
send_text $1 /tmp/$$telegram.txt
safe_quit
STDIN

This now results in this error:

[warn] Epoll ADD(1) on fd 0 failed.  Old events were 0; read change was 1 (add); write change was 0 (none): Operation not permitted
@vysheng
Copy link
Owner

vysheng commented Nov 9, 2014

Use '-e' option.

@nl0pvm
Copy link
Author

nl0pvm commented Nov 9, 2014

I can't enter multiple commands using -e option:

/home/user/tg/bin/telegram-cli -k /home/user/tg/tg-server.pub -u user -e "send_text user#87654321 /tmp/blaat; send_text user#12345678 /tmp/blaat" -W -vvvv  

results in:

*** No such file '/tmp/blaat; send_text user#12345678 /tmp/blaat'

this applies to:

  • using space as seperation sign
  • using ; as seperations sign
  • using \n as seperation sign

@vysheng
Copy link
Owner

vysheng commented Nov 10, 2014

You should use real line break as separator.

@nl0pvm
Copy link
Author

nl0pvm commented Dec 1, 2014

Thanks, Indeed this works!

@nl0pvm nl0pvm closed this as completed Dec 1, 2014
@txaume
Copy link

txaume commented Jan 20, 2015

-e option does nothing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants