Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I'm writing in C a mini-shell for a project. I need to implement a command "out" which acts exactly like the command of the bash ">". Example: out ls ...
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    5

    Redirect output of a command to a file

    Hi, I'm writing in C a mini-shell for a project. I need to implement a command "out"
    which acts exactly like the command of the bash ">".

    Example: out ls file.txt
    //should write the output of ls to file.txt, like the command ls > file.txt
    //on bash

    Anybody knows a function which can help me in this purpose?

    Regards


  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    I would try pipes...Gerard4143
    Make mine Arch Linux

Posting Permissions

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