LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Piping terminal results (https://www.linuxquestions.org/questions/linux-newbie-8/piping-terminal-results-856407/)

c0ld.3l3m3nt 01-14-2011 06:30 PM

Piping terminal results
 
If I wanted to pipe the results from grep to my irc channel how would I?

MS3FGX 01-14-2011 06:57 PM

Perhaps you could clarify a bit. Are you talking about injecting text into an IRC server you are running on the machine, or are you trying to send text from grep through an IRC client into a channel?

c0ld.3l3m3nt 01-14-2011 07:18 PM

Well I want to send the output directly to my channel either have it use my txt box to do .. I found this script here
Code:

function my_irc { tmp=`mktemp`; cat > $tmp;
{ echo -e "USER $username x x :$ircname\nNICK $nick\nJOIN $target";
while read line; do echo -e "PRIVMSG $target :$line"; done < $tmp; }
| nc $server > /dev/null ; rm $tmp; }

but I obviously dont understand it well enough to change the variables cause when I played around with it I get this result..
Code:

c0ld-desktop:~$ echo "test" | my_ircnc
:getaddrinfo: Name or service not known



All times are GMT -5. The time now is 06:08 AM.