LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-16-2003, 04:38 PM   #1
tells
Member
 
Registered: Jun 2003
Location: Peoria, IL
Distribution: Ubuntu (home) / RHEL (work)
Posts: 65

Rep: Reputation: 15
Output truncated when using pipe


I am trying to do a process list with ps -ewf and I want to grep some characters that are at the end. However whenever I use | or > to a file, the end characters are truncated so the grep does not work. Does anyone know how to redirect the output of ps without it being truncated?
 
Old 12-16-2003, 08:06 PM   #2
d_t_baker
Member
 
Registered: Oct 2003
Location: AU
Distribution: Ubuntu
Posts: 57

Rep: Reputation: 15
If you do

ps -ewf > tempfile

then the output from ps should go into tempfile. After doing the above command, do 'cat tempfile' and see if you get the same output as from the ps command.

If that still dosnt work, try doing the same thing in a different type of terminal, ie aterm instead of xterm, or even tty1 (get there by going ctrl+alt+F1) too see if that makes a difference.

Dave

Note:
ps axf
or
ps axfu
give a much nicer display
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to pipe and parse output of a command learnfast Linux - Newbie 2 06-15-2005 04:55 AM
how to pipe output from make BBB Programming 2 05-20-2005 06:14 AM
pipe xine output to file sohmc Linux - Software 0 01-01-2005 10:03 PM
Read the output from a pipe with bash ? fluppi Linux - Software 3 01-13-2004 12:59 PM
Truncated 'last' output, please help! Hackeron Linux - General 1 01-04-2004 08:34 AM


All times are GMT -5. The time now is 04:46 AM.

Main Menu
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