Pipe command

This is a discussion on Pipe command within the C++ Programming forums, part of the General Programming Boards category; Hi I am really having trouble understanding the concept behind pipe and fork command especially when trying to read input ...

  1. #1
    Registered User
    Join Date
    Aug 2002
    Posts
    1

    Unhappy Pipe command

    Hi I am really having trouble understanding the concept behind pipe and fork command especially when trying to read input from a file

  2. #2
    Seeking motivation... endo's Avatar
    Join Date
    May 2002
    Posts
    537
    Not 100% clear on what you mean but if you are talking about operating systems, the I guess | is a pipe and < and > are forks. Is that what you mean?

    That being the case the pipe takes the utput of one program and passes it into another eg ls -l | wc -l where the ls-l gives the directory list and passes it to wc -l which counts the number of lines.

    < and > redirect the output to or from files. So ls - l > listing.txt, gives the directory list and prints it in listing.txt. If its the other way round it will count the number of lines in listing.txt

    I hope that what you mean and if its incorrect I hope someone can correct me cos I haven't used it for a while
    Couldn't think of anything interesting, cool or funny - sorry.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 11:43 AM
  2. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 04:30 PM
  3. exe files in -c- language
    By enjoy in forum C Programming
    Replies: 6
    Last Post: 05-18-2004, 05:36 PM
  4. exec with linux pipe command
    By rotis23 in forum C Programming
    Replies: 4
    Last Post: 08-22-2002, 09:34 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21