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

Redirect sent message to file #28

Closed
jungle-boogie opened this issue Sep 13, 2019 · 2 comments
Closed

Redirect sent message to file #28

jungle-boogie opened this issue Sep 13, 2019 · 2 comments

Comments

@jungle-boogie
Copy link

Hello,

Is is possible to have the message that's sent to Gotify also saved to a text file?

.\gotify-cli-windows-amd64.exe push "hello" > checkme.txt
> type .\checkme.txt
message created

I would like to have "hello" saved in the text file.

@jmattheis
Copy link
Member

You could use tee, which is a utility that reads stdit and writes to stdout and to a file

$  echo -n "Hello" | tee checkme.txt | ./cli push 
message created
$  cat checkme.txt 
Hello

or you could create the file and then redirect its content to gotify

$  echo -n "Hallo" > checkme.txt
$  ./cli push < checkme.txt     
message created

@jungle-boogie
Copy link
Author

Thank you. I'll try try out the second suggestion, if my other solution outside of gotify doesn't prove reliable.

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

No branches or pull requests

2 participants