Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-14-2011, 06:30 PM   #1
LQ Newbie
Registered: Jan 2011
Location: Netherlands
Posts: 7

Rep: Reputation: 0
Piping terminal results

If I wanted to pipe the results from grep to my irc channel how would I?
Old 01-14-2011, 06:57 PM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
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?
Old 01-14-2011, 07:18 PM   #3
LQ Newbie
Registered: Jan 2011
Location: Netherlands
Posts: 7

Original Poster
Rep: Reputation: 0
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
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..
c0ld-desktop:~$ echo "test" | my_ircnc
:getaddrinfo: Name or service not known

Last edited by c0ld.3l3m3nt; 01-14-2011 at 07:56 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysterious discrepancy b/w script results at terminal and in python script cedardoc Linux - Newbie 1 08-03-2010 03:59 PM
Linux piping vs Windows piping emanabela Linux - Newbie 1 05-10-2009 12:58 PM
Running command in gnome-terminal from script results in "...error creating child..." PlancksCnst Linux - General 6 04-08-2009 12:09 PM
Terminal automatically prints results geekbynature Linux - General 3 08-28-2008 04:54 PM
Help with piping mijohnst Linux - General 7 10-21-2005 04:14 PM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration