Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: The basics

by Tanktalus (Canon)
on Jun 25, 2006 at 14:25 UTC ( #557432=note: print w/replies, xml ) Need Help??


in reply to (OT) Re^3: The basics
in thread The basics

I'm trying to figure out where you get the idea that the contents are passed to tail's stdin. It's not. The full path to the file (as given by the shell - full path if searched via PATH, relative path if PATH not used) is passed in.

Compare the output of "strace ./a" and "strace /usr/bin/tail -n2 < a". The former has a call to "open" and all reading is done from filehandle 3. The latter doesn't call open, and all reading is done from filehandle 0.

Replies are listed 'Best First'.
Re^5: The basics
by Hue-Bond (Priest) on Jun 25, 2006 at 14:35 UTC
    I'm trying to figure out where you get the idea that the contents are passed to tail's stdin.

    I guess I'll also have to. To my surprise, you're right.

    --
    David Serrano

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://557432]
help
Chatterbox?
[RonW]: RPerl is only a curiosity to me. I can see where some one who primarily codes in Perl might find RPerl useful, but to me, given the choice between RPerl's restrictions and C, I'd choose C
[LanX]: Rperl had better chances as alternative for inline::cpp
[LanX]: thus optimizing inner loops
[LanX]: .... well

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2017-05-22 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?