- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- AT&T Ksh Timezone bug
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2004 08:23 PM
тАО04-27-2004 08:23 PM
AT&T Ksh Timezone bug
We've downloaded the AT&T ksh as pdksh doesn't not have sufficient functionality for our scripting needs.
Unfortunately for us, this ksh has a built-in for date which has a bug in it and so isn't picking up that the clocks changed last month.
We can get around this by adding an alias date=/bin/date in the .profile or .kshrc, however, when someone runs a script with #!/bin/ksh at the top, then this information is not passed on to the sub-shell.
Does anyone know how to export aliases, like environmental variables?
Alternatively, can someone suggest a solution that will work with sub-shells?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 01:55 AM
тАО04-28-2004 01:55 AM
Re: AT&T Ksh Timezone bug
I use it and scripts run fine.
Else try to put an alias to date in the script or specify full path.
Peace, R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 03:24 AM
тАО04-28-2004 03:24 AM
Re: AT&T Ksh Timezone bug
One correction if you let me : pdksh is NOT the ATT Korn Shell, it's a clone developped before ksh could be freely downloaded.
It has limitations that the original one have not.
The real ksh is downloadable at :
http://www.research.att.com/sw/download/gen/ast-ksh.html
Cheers
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 03:38 AM
тАО04-28-2004 03:38 AM
Re: AT&T Ksh Timezone bug
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 03:52 AM
тАО04-28-2004 03:52 AM
Re: AT&T Ksh Timezone bug
Peace, R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 03:52 AM
тАО04-28-2004 03:52 AM
Re: AT&T Ksh Timezone bug
I have found that /bin/sh has run correctly almost all of my korn shell based scripts that I was forced to port from hp-ux to Linux.
Just a thought.
You could also handle such issues as timezone by setting a variable globally in all scripts that lets them calculate from there.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 07:36 AM
тАО04-28-2004 07:36 AM
Re: AT&T Ksh Timezone bug
Try that one :
pdksh> echo value | read var ; echo $var
<-- Null
ksh> echo value | read var ; echo $var
value
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 08:57 AM
тАО04-28-2004 08:57 AM
Re: AT&T Ksh Timezone bug
echo value | read var; echo $var
to mean
echo value | (read var; echo $var)
instead of
(echo value | read var); echo $var
Ie. you want the | operator to take precedence over ; I'm no scripting guru, but this is at odds with most standard programming languages and is one reason many serious programmers are not very fond of scripting. Why not simply bite the bullet and find another way (for example, using parentheses)?
Bruce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 11:37 AM
тАО04-28-2004 11:37 AM
Re: AT&T Ksh Timezone bug
There's ways around that, i.e.:
read var < <(echo blah)
But that's an aside.
If the AT&T ksh implementation has a borked inbuilt 'date', then do one of two things.
- ensure that all of your scripts which will use it use fully pathed commands: /bin/date
- force the hash-bang calls to initiate a login-shell, thus processing /etc/profile etc. so you can force your own aliases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 08:08 PM
тАО04-28-2004 08:08 PM
Re: AT&T Ksh Timezone bug
Mike