Re: Strange ksh93 problem
- From: "Dan Mercer" <damercer@xxxxxxxxxxx>
- Date: Wed, 20 Dec 2006 23:18:31 -0600
"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
:
.
- References:
- Strange ksh93 problem
- From: sambrntt
- Re: Strange ksh93 problem
- From: Dan Mercer
- Re: Strange ksh93 problem
- From: sambrntt
- Strange ksh93 problem
- Prev by Date: Re: Calculating End Date and time, if the script aborts
- Next by Date: Re: transposing fields with sed or awk
- Previous by thread: Re: Strange ksh93 problem
- Next by thread: Re: Strange ksh93 problem
- Index(es):
Relevant Pages
|