LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 06-24-2005, 04:41 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Rep: Reputation: 53
Command line to get output on a file


Hi folks,

On Konsole window I started Gnomemeeting with;

$ LC_ALL=C gnomemeeting -d4

and then connected it to a remote self-testing site on Gnomemeeting device. All output were printed on the Konsole window.

I tried with following command line in anticipation to get the output to a file without success;

$ LC_ALL=C gnomemeeting -d4 > /path/to/record.txt.

Only an empty file was created. Please advise what will be the correct command line to be used.

TIA

B.R.
satimis
 
Old 06-24-2005, 05:00 AM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
Try :

LC_ALL=C gnomemeeting -d4 > /path/to/record.txt 2>&1
 
Old 06-24-2005, 05:14 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi keefaz,

Tks for your advice.

Quote:
LC_ALL=C gnomemeeting -d4 > /path/to/record.txt 2>&1
It worked for me.

Please advice what is the function of '2>$1'

Besides can the printout also be displayed on Konsole simultaneously. If YES, what shall I add. TIA

B.R.
satimis
 
Old 06-24-2005, 06:04 AM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
2 : standard error output
1 : standard output

2>&1 : output both standard and error (bash shell syntax)

Quote:
Besides can the printout also be displayed on Konsole simultaneously
You could use tee command
Code:
LC_ALL=C gnomemeeting -d4  2>&1 | tee /path/to/record.txt
 
Old 06-24-2005, 07:04 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,428

Original Poster
Rep: Reputation: 53
Hi keefaz,

Quote:
Code:
LC_ALL=C gnomemeeting -d4  2>&1 | tee /path/to/record.txt
It works. Tks

B.R.
satimis
 
  


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
Redirecting output to a command-line argument of another command madiyaan Linux - Newbie 1 02-19-2005 05:35 PM
nfs a file shares ok via file mngr but not command line. Suse 9.1 acummings Linux - Networking 2 10-09-2004 03:23 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 08:45 PM
how to enumerate first line of text file to standard output? zero79 Linux - General 1 07-07-2004 07:37 PM
Help: Command Output to File. rvijay Linux - Newbie 3 09-30-2003 10:02 AM


All times are GMT -5. The time now is 09:41 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