Google Answers Logo
View Question
 
Q: Unix test question/answer dispute ( Answered 5 out of 5 stars,   3 Comments )
Question  
Subject: Unix test question/answer dispute
Category: Computers > Operating Systems
Asked by: hellznrg-ga
List Price: $2.00
Posted: 11 Nov 2004 00:20 PST
Expires: 11 Dec 2004 00:20 PST
Question ID: 427457
in a C++/Unix test, a question asked was "State the difference between
pipeline and redirection". I answered it as follows:

(quote)
Pipeline directs data flow to/from programs.
Redirection directs data flow from programs to file or from file to program.
(unquote)

my answer was marked wrong and i got zero out of two points. however i
think i deserve full marks for my answer.... what do u think?
Answer  
Subject: Re: Unix test question/answer dispute
Answered By: hammer-ga on 11 Nov 2004 05:04 PST
Rated:5 out of 5 stars
 
Your answer shows that you have a correct basic understanding of the
concept. My partner has been a UNIX programmer for 22 years, and he
also says it looks right to him.

You may have simply failed to use a particular term they were looking
for, or they may have wanted a more thorough (longer) explanation. For
example, you don't discuss the limitations. You also don't discuss the
specific differences in behavior.

Additional resources
--------------------
Pipes, Lists & Redirection
http://www.injunea.demon.co.uk/pages/page208.htm

man pipes

man pages for different shells usually discuss redirection


Search Strategy
---------------
Google Search: pipe redirect


- Hammer
hellznrg-ga rated this answer:5 out of 5 stars
thanks... your answer was great... i don't really have a great deal of
experience in unix, but while i was using pipelining and redirection
in unix, the understanding of the basic difference just "came" to me.

if u enter this command "echo x|more", the shell will run the echo
command and pipeline the output to the _program_ called "more"

however, if u enter this command "echo x>more", the shell will run the
echo command and redirect the output to a _file_ called "more"

Comments  
Subject: Re: Unix test question/answer dispute
From: mathtalk-ga on 11 Nov 2004 05:41 PST
 
I agree with hammer-ga that your answer was basically correct.  This
is a difficult question to grade in my opinion, because of the variety
of ways to distinguish these closely related Unix shell concepts.

A completely superficial approach might have been to say:  Pipelining
uses the pipe (|) symbol.   Redirection uses inequality symbols (<,>).

A more significant observation, which your answer verges on without
explicitly bringing out, is that pipelining can involve a succession
of multiple programs (filters) written to take advantage of
redirection.  In this sense pipelining relies on the more elementary
redirection feature.

regards, mathtalk-ga
Subject: Re: Unix test question/answer dispute
From: crythias-ga on 11 Nov 2004 06:52 PST
 
Perhaps this: a Pipeline takes output from the program to the left of
the | and uses that output as the input for the program to the right
of the |.

A redirect is a bit more complicated. It can override stdin (<),
stdout (>), and stderr (2>).  It has the ability to use a file as the
source for input and can store the output in a file. Redirect also
allows the ability to append to an existing file (>>).

Respectfully, although the answer demonstrates the most basic grasp of
the differences, it doesn't address understanding of usage which may
be more of what the grader is intending to check.
Subject: Re: Unix test question/answer dispute
From: hellznrg-ga on 12 Nov 2004 16:05 PST
 
hey u guys... thanks a million for your helpful answers...! too bad i
can't rate mathtalk and crythias... for i would have given u both 5
stars too...

as to your queries, the professor in fact did say that he would have
preferred a memorized definition... :( i'm good in this subject,
possibly one of the best students in the class, but i fear i may fail
this subject... that sucks big time

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy