LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 02:43 AM   #1
wang
Member
 
Registered: Dec 2010
Distribution: ubuntu 10.04
Posts: 43

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, 08: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, 10:14 AM   #3
wang
Member
 
Registered: Dec 2010
Distribution: ubuntu 10.04
Posts: 43

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, 09:41 AM   #4
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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
Open Source Consulting | Domain Registration