... egrep can be used in place of grep. On many systems, grep is
just a symbolic link to egrep ...
I've worked on a lot of Unix and Unix-alike systems, and can't
remember grep being a symbolic link to egrep. Often, grep, egrep,
and fgrep are all hard links to the same executable; the program
checks argv[0] and acts accordingly.
Oh boy, what I intended was "On some systems ...", not really
"On *many* systems". :-(
Okay.
... On 10.2.2, /usr/bin/grep seems to be a hard link to
/usr/bin/grep, BTW.
Something is wrong with the above sentence.
Yes, but please correct the "many" as "some" and reinterpret this
sentence.
Even so, it still says:
A is a hard link to A.
Perhaps instead of: /usr/bin/grep ... hard link to /usr/bin/grep
You meant: /usr/bin/grep ... hard link to /usr/bin/egrep
(Note the extra "e" in my version.)
No harm, no foul.
Here's what I get from my 10.1.5 system:
$ ll -i /*/bin/*grep
1192004 -rwxr-xr-x 3 root admin 1582 Apr 1 2002
/sw/bin/bzegrep
1192004 -rwxr-xr-x 3 root admin 1582 Apr 1 2002
/sw/bin/bzfgrep
1192004 -rwxr-xr-x 3 root admin 1582 Apr 1 2002
/sw/bin/bzgrep
195214 -rwxr-xr-x 1 root admin 262620 Dec 6 2001
/sw/bin/egrep
195215 -rwxr-xr-x 1 root admin 262620 Dec 6 2001
/sw/bin/fgrep
195216 -rwxr-xr-x 1 root admin 262620 Dec 6 2001
/sw/bin/grep
1642371 -rwxr-xr-x 1 root admin 34116 May 13 2002
/sw/bin/pcregrep
1207186 -rwxr-xr-x 1 root admin 1332 Apr 3 2002
/sw/bin/zgrep
2350644 -rwxr-xr-x 1 root wheel 105548 Aug 3 10:30
/usr/bin/egrep
2350376 -rwxr-xr-x 1 root wheel 105548 Aug 3 10:30
/usr/bin/fgrep
2350675 -rwxr-xr-x 1 root wheel 105548 Aug 3 10:30
/usr/bin/grep
2350925 -r-xr-xr-x 1 root wheel 14640 Aug 3 10:30
/usr/bin/nigrep
73728 -rwxr-xr-x 1 root wheel 1371 Sep 2 2001
/usr/bin/zgrep
I'm surprised that /sw/bin/*grep and /usr/bin/*grep are two sets
of three copies of files; I would have expected them to look more
like /sw/bin/bz*grep (which is a very good example of a program
checking argv[0] (or $0, since this program happens to be a shell
program) and acting accordingly).
So, /(usr|sw)/bin/[ef]?grep are not hard links each other?
No. Note the first column (the inode number) and the column
between the permissions and the files' owner (the number of hard
links to the file). Ettore Aldrovandi explained them in his
mail.
Unfortunately, /usr/bin/[ef]?grep is the same file three times,
taking up three times as much space as should be necessary. This
is probably a concession to HFS+ and/or Apple's package management
tools. I'm not exactly sure how Apple implements Unix links
(hard or symbolic) on HFS+.
... I still don't really understand how X works ever after
trying to make friends with it. Could somebody here explain
why?
I'm a hacker, not a sociologist. ;-)
I wanna be both, if it is compatible. (-;
Well, after writing computer software professionally for 22 years
on my high school education, I am now an undergraduate college
student. My majors are math and physics, but I'm taking sociology
next semester to fulfill a gen-ed requirement, so maybe I'll be
better informed by May. :-)
HTH,
Dan
--
<mailto:[EMAIL PROTECTED]>
<http://www.tombstonezero.net/dan>
An omer is a tenth of an ephah. -- Exodus 16:36.
-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now! Before the Holidays pass you by.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users