Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need to get the dates of the previous 7 days inside a script. this is on a solaris 5.8 machine and the date needs to be in the form yyyymmdd. questions welcome... I'll try to get right back to you because this is for work.
the shell situation here is frustrating to put it mildly. everyone here uses bash, all of our scripts are to be written in sh, and all of our machines default to csh. and there are no exceptions to ever be made to any of the rules. looks like the modifying TZ will work though, thanks for everyones input.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by farkus888
the shell situation here is frustrating to put it mildly. everyone here uses bash
That is a common situation, especially from users with a Linux background.
Quote:
, all of our scripts are to be written in sh
Thas is a big mistake, shell scripts should be written in a POSIX compliant shell, /bin/sh is a legacy one, not compliant.
Better use ksh or perhaps /usr/xpg4/bin/sh
Quote:
and all of our machines default to csh.
What do you mean defaults ? When you create a new account, the shell has to be csh ? That's a quite obsolete policy.
That is a common situation, especially from users with a Linux background.
Thas is a big mistake, shell scripts should be written in a POSIX compliant shell, /bin/sh is a legacy one, not compliant.
Better use ksh or perhaps /usr/xpg4/bin/sh
What do you mean defaults ? When you create a new account, the shell has to be csh ? That's a quite obsolete policy.
like I said, its frustrating to deal with but those are the rules here and I get the ruler across the knuckles every time I question it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.