Find the answer to your Linux question:
Results 1 to 5 of 5
What is the command I need to use a command's output to a editor? I thought it would be something like: ls -l > gedit or ls -l | gedit ...
  1. #1
    Just Joined! newbie56's Avatar
    Join Date
    Jan 2009
    Posts
    36

    [SOLVED] Command for output to vi or gedit

    What is the command I need to use a command's output to a editor? I thought it would be something like:

    ls -l > gedit or ls -l | gedit
    rpm -Va > vi

  2. #2
    Just Joined!
    Join Date
    Feb 2009
    Location
    USA
    Posts
    21
    the correct command is,
    Code:
    ls -l > filename
    rpm -Va > filename
    Your commands will work also but the filenames are gedit and vi.

  3. #3
    Just Joined! newbie56's Avatar
    Join Date
    Jan 2009
    Posts
    36
    You kinda answered my question. What I am really trying to do is call the command such as ls -l and then open up vi or gedit as well as saving the filename. So I thought this might work but it didn't:

    ls -l > vi output.txt

  4. #4
    Just Joined!
    Join Date
    Feb 2009
    Location
    USA
    Posts
    21
    simplest way to dao that would be

    Code:
    ls -l > filename && vi filename

  5. #5
    Just Joined! newbie56's Avatar
    Join Date
    Jan 2009
    Posts
    36
    thanks. Closed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...