Re: Strange ksh93 problem




"sambrntt" <sam.brunetti@xxxxxxxxxxxxx> wrote in message news:1166538746.564224.270340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
: Thanks Dan but still no good. The strange thing about this is that the
: script has been working for years and has not been modified since it
: was implemented and also the system administrator assures me that no
: changes were made to the operating system. Its as if ksh93 is not being
: recognized anymore maybe its a license issue. Well back to the drawing
: board.
: Dan Mercer wrote:
: > "sambrntt" <sam.brunetti@xxxxxxxxxxxxx> wrote in message news:1166470455.568412.287890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
: > : Hello,
: > :
: > : Has anybody else run into the following strange problem. I'm using
: > : ksh93 in a script which has been running for a couple of years with no
: > : problems. All of a sudden I'm receiving an error message when it
: > : executes the following simple function to get the current month:
: > :
: >
: > Try:
: >
: > typeset month
: > : function month.get
: > : {
: > :
: > : .sh.value=$(date +%B)
: > : }
: > :
: > : The error message is: "month.get: This is not an identifier."
: > :
: > : The operating system is AIX 5.2 and no changes have been made to the
: > : script or operating system for years.
: > :
: >
: > month must exist before you can define a discipline function for it.
: >
: > Dan Mercer

Some possibilities:

You aren't running ksh93 - run "ksh93 script" to be sure.
Someone has edited the file under M$ and you have

"function month.get^M" - ^M is not a legal identifier
"cat -vet script" will help there.

You have a poisoned environment - some exported var is
crashing things. Maybe someone has "typeset -r month" or something
weird. Typesetting can be exported (!!!) - ksh93 passes that info
in a private var. Use env to provide a clean environment:

env -i HOME="$HOME" PATH="$PATH" script

Dan Mercer

:


.



Relevant Pages

  • Re: Strange ksh93 problem
    ... Thanks Dan but still no good. ... Has anybody else run into the following strange problem. ... ksh93 in a script which has been running for a couple of years with no ... The operating system is AIX 5.2 and no changes have been made to the ...
    (comp.unix.shell)
  • GHOSTBUSTERS 3 shooting this fall?!?!?!?
    ... GHOSTBUSTERS 3 shooting this fall?!?!?!? ... Dan, I'm extremely excited for the HOB to be back ... I've heard that the writers of the Office are currently penning a script? ... and should we look forward to this movie seeing ...
    (rec.sport.pro-wrestling)
  • Re: MYSQLD mysql-server for 5.2.1
    ... You can run mysqld manually in FreeBSD, ... > And the real confusing thing is that there is no chkconfig sort of ... script to see what keyword it uses. ... Dan Nelson ...
    (freebsd-questions)
  • Re: IE can not open a 2nd window - w/SP2
    ... "Dan" wrote in message ... > tNX FOR THE INFO. ... Windows Script 5.6 for Windows 2000 and XP ... Dealing with Hijackware ...
    (microsoft.public.windowsxp.basics)
  • Re: Ksh Shell script security question.
    ... When I run this code from shell script in /tmp directory it spews ... Doesn't it (ksh93, ...
    (freebsd-questions)