dwatts@ki.UUCP (Dan Watts) (11/30/90)
On the IBM RS/6000, is there a way to test to see if a file is a soft link? Under BSD, the "-h" option to test does this. For sysV, the option is "-l". I'm running AIX 3.1 and the man page for test doesn't show anything. Is it possible that they left this ability out?? I've got a few shell scripts that need to know whether the file is a _real_ file or just a soft link. I guess I could write a little C program to figure out the file type and return 0 or 1, but I'd rather just use test if at all possible. -- ################## Skinny Dippers Have Less Stress ################## # CompuServe: >INTERNET:uunet.UU.NET!ki!dwatts Dan Watts # # UUCP : ...!{uunet | wgc386}!ki!dwatts Ki Research, Inc. # ############### New Dimensions In Network Connectivity ##############
ron@woan (Ronald S. Woan) (12/04/90)
In article <898@ki.UUCP>, dwatts@ki.UUCP (Dan Watts) writes:
Dan> On the IBM RS/6000, is there a way to test to see if a file is a
Dan> soft link? Under BSD, the "-h" option to test does this. For
Dan> sysV, the option is "-l". I'm running AIX 3.1 and the man page
Dan> for test doesn't show anything. Is it possible that they left
Dan> this ability out?? I've got a few shell scripts that need to
Dan> know whether the file is a _real_ file or just a soft link. I
Dan> guess I could write a little C program to figure out the file
Dan> type and return 0 or 1, but I'd rather just use test if at all
Dan> possible.
Interesting, I looked in the BSD 4.3 (URM) manual under TEST(1) and it
makes no mention of the -h manual; are you sure that it's not part of
your shell somehow? If it is not documented in the manual, chances are
the AIX programmers didn't know about it... In any case, I'll try it
out on a Sun at home... If you are using ksh for your shell script,
"test -L filename" returns existence and symbolic link...
+-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+
+------------------------------My Employer----------------------------------+
+ Ronald S. Woan woan@peyote.cactus.org or woan%austin@iinus1.ibm.com +
+ other email addresses Prodigy: XTCR74A Compuserve: 73530,2537 +
ron@woan (Ronald S. Woan) (12/04/90)
In article <4442@awdprime.UUCP>, ron@woan (Ronald S. Woan) writes:
Ron> Interesting, I looked in the BSD 4.3 (URM) manual under TEST(1)
Ron> and it makes no mention of the -h manual; are you sure that it's
Ron> not part of your shell somehow? If it is not documented in the
Ron> manual, chances are the AIX programmers didn't know about it...
Ron> In any case, I'll try it out on a Sun at home... If you are
Ron> using ksh for your shell script, "test -L filename" returns
Ron> existence and symbolic link...
OK checked it out and "-h" is indeed in SunOS 4.0... A value-addded
enhancement to BSD 4.3 by Sun or had it been folded into BSD? I guess
that means, does BSD 4.3 on Vaxes have it?
+-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+
+------------------------------My Employer----------------------------------+
+ Ronald S. Woan woan@peyote.cactus.org or woan%austin@iinus1.ibm.com +
+ other email addresses Prodigy: XTCR74A Compuserve: 73530,2537 +