LinuxQuestions.org
Review your favorite Linux distribution.
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 01-10-2011, 06:04 AM   #1
truboy
Member
 
Registered: Oct 2010
Location: Switzerland
Posts: 84

Rep: Reputation: 9
Clone standard output to /dev/tty0


Hi all,

I'm working on a SBC9261 board with touchscreen, running Linux 2.6.24.

/dev/ttyS0 is the standard output and /dev/tty0 is the console on the touchscreen.

What I would like to do is to clone the standard output to the touchscreen, so the console would be displayed twice.

It would be like :

Code:
~ $ ./whatEverScript > /dev/tty0
but the output would also appear on /dev/ttyS0.

Do you have an idea ?

Thank you !
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-10-2011, 07:51 AM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,194

Rep: Reputation: 105Reputation: 105
you want the "tee" command (do a `man tee`).

Code:
~ $ ./WhatEverScript | tee /dev/tty0
you might want "2>&1" before the "|" to get standard error as well.
 
2 members found this post helpful.
Old 01-10-2011, 08:04 AM   #3
truboy
Member
 
Registered: Oct 2010
Location: Switzerland
Posts: 84

Original Poster
Rep: Reputation: 9
Quote:
Originally Posted by choogendyk View Post
you want the "tee" command (do a `man tee`).
Nice ! I didn't know that command !

Thank you !
 
  


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
How To Clone Single Drive To Raid 1+0 (copy /dev/sde to /dev/md0)? alfista Linux - Server 5 03-18-2008 11:57 PM
How To Clone Single Drive To Raid 1+0 (copy /dev/sde to /dev/md0)? alfista Linux - Server 2 03-17-2008 11:26 PM
How To Clone Single Drive To Raid 1+0 (copy /dev/sde to /dev/md0)? alfista Linux - Server 2 03-13-2008 05:17 AM
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory) souhakubunn Linux - Software 1 10-04-2007 08:11 AM
/dev/tty0, /dev/tty1, /dev/tty10...and so on...which should be used for a device ??? b0nd Slackware 2 04-02-2006 09:14 AM

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

All times are GMT -5. The time now is 12:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration