LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 03:41 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
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, 04:00 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Try :

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

Original Poster
Rep: Reputation: 56
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, 05:04 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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, 06:04 AM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi keefaz,

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

B.R.
satimis
 
  


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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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