Zack Weinberg wrote:
> Bob Proulx wrote:
> > Just a detail clarification...
> > HP-UX 10.20, arguably the oldest HP-UX version still in active use
> > anywhere, supports the 'tail -n#' syntax.
> 
> Are you absolutely certain that the version of tail in /bin or
> /usr/bin supports that syntax?

Yes.  I am absolutely certain.  This was my main desktop for years and
years and I still have it up and running today.

  printf "one\ntwo\nthree\n" | /usr/bin/tail -n2
  two
  three
  uname -a
  HP-UX hpbox B.10.20 A 9000/785 2003339568 two-user license
  model
  9000/785/C360
  /usr/bin/tail -?
  Usage: tail [-f] [-b number] [file]
         tail [-f] [-c number] [file]
         tail [-f] [-n number] [file]
  Obsolescent usage: tail [+-[n][l|b|c]] [-f] [file]

> I have this dim memory that the situation was similar to Solaris -
> i.e. modern tools in /usr/something/bin, not in /usr/bin, portable
> scripts are still hosed.

On HP-UX 10.01 and later /bin and /usr/bin were combined into /usr/bin
and /bin is now a symlink to /usr/bin.  Similarly for /lib which is
now a symlink to /usr/lib.  Theoretically use of /bin is deprecated
there but obviously there needs to be /bin/sh or all #!/bin/sh scripts
would be broken and so the /bin symlink can never go away.  But this
means there is only one main bin directory and that is /usr/bin with
all programs in it.

HP-UX does funny things with tools installed in /opt/<package>/bin
where paths to those tools are listed in /etc/PATH and /etc/profile
includes all /etc/PATH paths into your PATH at login time.  This means
that after installation you must log out and log back in to get your
PATH set up correctly.  That is an unfortunate design choice akin to
some operating systems requiring a reboot after software installation.
Note that RH also has a similar design problem with their use of
/etc/profile.d/* scripts so this is not solely an HP-UX problem.

Additionally there is /usr/ccs/bin which is where the native K&R
compiler and linker live.  On HP-UX /usr/ccs/bin is required to be in
PATH in addition to /usr/bin.  But that is the old K&R compiler and
not the modern ANSI compiler.  Included in /opt is /opt/ansic/bin
which is where the c89 ANSI compiler lives if installed.  But again in
both cases the paths to them are included in the file /etc/PATH and
are placed into the PATH by /etc/profile at login time.  I don't
prefer the design choice but it *is* functional as installed, just not
pretty.  Also note that on a minimum system only the old K&R compiler
is installed in /usr/ccs/bin and the c89 ANSI compiler is an
additional optional product in /opt/ansic/bin which may not be
installed at all.

> They certainly did do similar crazy things for the sake of backward
> compatibility, e.g. requiring you to add a special object to the
> link if you wanted your binaries to honor SIGXCPU, because SIGXCPU
> was only in Unix95...

Yes.  And the 'ps -H' as in 'ps -efH' option to sort by parent-child
process relationship is only available if the UNIX95 variable is set.
I have an alias ps='UNIX95=1 ps' just for that reason.  And there are
other things too.

Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to