LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices



Reply
 
Search this Thread
Old 10-04-2012, 03:43 AM   #1
wang
Member
 
Registered: Dec 2010
Distribution: ubuntu 10.04
Posts: 41

Rep: Reputation: 0
Use named fifo to do a useful and funny thing


Hi,friends!

We know that the espeak command can speak out anything you give to it,and I want
to use it to work together with the elinks command to scan any English website with its contents being read at the same time.So,my clever friends,any good ideas?

Still,I wonder if I can just type "myCommand theWebSite" to do it for saving types.

I think this may be related with fifo and alias,but i just can't figure out a method.
Thanks in advance!
 
Old 10-05-2012, 09:59 AM   #2
henrycoffin
Member
 
Registered: Dec 2006
Distribution: RHEL Debian
Posts: 42

Rep: Reputation: 15
Surely espeak would just read out the html code????????
 
Old 10-11-2012, 11:14 AM   #3
wang
Member
 
Registered: Dec 2010
Distribution: ubuntu 10.04
Posts: 41

Original Poster
Rep: Reputation: 0
Sorry for replying to you so late.
But I am afraid that you have not tried that yet.
Code:
  elinks somesite.com | cat | espeak
That's it.But what I want is to browse the somesite at the same time.
And I wonder if I could divide the flow produced by "elinks somesite.com | cat" into two parts,one for espeak,and the other for stdout,thus listening and reading at the same time.
 
Old 10-12-2012, 10:41 AM   #4
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,541

Rep: Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878
cat never divides the flow, it only concatenates files; or, to continue the pipe metaphor, merges files into the flow. For dividing flow you want to use tee. The info page for tee shows some examples using the shell's process substitution.

For your case, it would be something like this:
Code:
 elinks somesite.com | tee >(espeak)
 
1 members found this post helpful.
  


Reply


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
What is meaning that a file is a named pipe (FIFO)? mei0fei Linux - Newbie 2 07-12-2011 07:48 AM
Question about reading/writing into a Named Pipes(FIFO) Sathya Programming 21 05-05-2008 09:39 AM
Funny thing happened on the way...... Rick069 Mandriva 5 11-01-2005 01:39 AM
Funny little thing... Mathiasdm General 2 01-15-2005 06:34 AM
Funny flash thing... Mega Man X General 2 05-07-2004 06:02 PM


All times are GMT -5. The time now is 09:48 PM.

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