two new scripts making use of stdin input

This commit is contained in:
Vishal 2022-12-29 02:16:20 +05:30
parent 2edf5bb361
commit 9085c8a64a
2 changed files with 15 additions and 0 deletions

6
scripts/announce.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# writes hello to a group
channel=test99
{ echo -e "3\n1\n${channel}\nHello, this is a random test.\nx\nx\nx" ; cat /dev/stdin; } | ./nostr_console_ubuntu_x64 --prikey=`openssl rand -hex 32`

9
scripts/gotoChannel.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# tested on Linux/Ubuntu
# will go to the channel mentioned in this variable; change it to go to that channel
# arguments passed to this script are passed to the nostr_console
channel=52ca
{ echo -e "3\n1\n${channel}" ; cat /dev/stdin; } | ./nostr_console_ubuntu_x64 $@