Operating System - HP-UX
1849365 Members
5654 Online
104044 Solutions
New Discussion

Re: Trusted System Audit Log

 
Andrew Luis Arruza
Frequent Advisor

Trusted System Audit Log

I hve been having a very difficult time getting the attached script to print any results.
All that prints out is the header. This script was working a few weeks ago and as far as I know nothing was changed on the system.
The attached is a copy of the original script.
Sure would appreciate any help.
As always, point will be very gratefully given.
Thanks, Andy
It is, after all, a matter of survival!!
3 REPLIES 3
Martin Johnson
Honored Contributor

Re: Trusted System Audit Log

Your attachment show the first line "#!/bin/ksh" as being indented. There should not be any leading spaces or tabs for this line to work. Verify that there are no leading spaces or tabs.

HTH
Marty
Bill Hassell
Honored Contributor

Re: Trusted System Audit Log

Since it references a non-HP-UX command (dsmc--which looks like a 3rd party backup program), it will be difficult to determine why it is failing without a debug trace. Run the script with:

ksh -x ./script_name 2>&1 | lp -dsome_printer

And then you can see the errors. It's always advisable to have a set -u at the beginning of every script to catch spelling errors before they cause damage. Note also that /bin does not exist in HP-UX (it's been gone for about 8 years). /bin (and /lib) are transition links that point to the 'real' directories: /usr/bin (this is similar to Solaris)

BTW: The indent for attachments is an artifact of the ITRC Forum software. ASCII files will always have this line 1 indent.


Bill Hassell, sysadmin
Ceesjan van Hattum
Esteemed Contributor

Re: Trusted System Audit Log

If the script starts running, but you are not sure at what point it fails, then type
set -x
set +x
It will show you what happens.
Each executed line will start with a '+', which makes tracing very easy.

Succes,
Ceesjan