E.B.
2015-Apr-24 10:07 UTC
[CentOS] Real sh? Or other efficient shell for non-interactive scripts
I'm sure most people here know about Dash in Debian. Have there been discussions about providing a more efficient shell in Centos for use with heavily invoked non-interactive scripts? With sh being a link to bash in Centos I don't know if it would explode if the link was changed to something else, but at least the scripts we made on our own that run certain services could be changed and tested manually to another shell. Are there other people who have experience in this and can provide interesting guidance?
Pete Geenhuizen
2015-Apr-24 10:57 UTC
[CentOS] Real sh? Or other efficient shell for non-interactive scripts
On 04/24/15 06:07, E.B. wrote:> I'm sure most people here know about Dash in Debian. Have there > been discussions about providing a more efficient shell in Centos > for use with heavily invoked non-interactive scripts? > > With sh being a link to bash in Centos I don't know if it would > explode if the link was changed to something else, but at least > the scripts we made on our own that run certain services could > be changed and tested manually to another shell. > > Are there other people who have experience in this and can > provide interesting guidance? > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >Why go to that extreme if you tell a script on line 1 which shell to run it will do so. #!/bin/dash or what ever shell you want it to run in. I always do that to make sure that the script runs as expected, if you leave it out the script will run in whatever environment it currently is in. Pete -- If money can fix it, it's not a problem. -- Click and Clack the Tappet brothers
mark
2015-Apr-24 12:02 UTC
[CentOS] Real sh? Or other efficient shell for non-interactive scripts
On 04/24/15 06:57, Pete Geenhuizen wrote:> > On 04/24/15 06:07, E.B. wrote: >> I'm sure most people here know about Dash in Debian. Have there >> been discussions about providing a more efficient shell in Centos >> for use with heavily invoked non-interactive scripts? >> >> With sh being a link to bash in Centos I don't know if it would >> explode if the link was changed to something else, but at least >> the scripts we made on our own that run certain services could >> be changed and tested manually to another shell. >> >> Are there other people who have experience in this and can >> provide interesting guidance? >> > Why go to that extreme if you tell a script on line 1 which shell to run it > will do so. > #!/bin/dash > or what ever shell you want it to run in. I always do that to make sure that > the script runs as expected, if you leave it out the script will run in > whatever environment it currently is in. >I'm confused here, too, and this has been bugging me for some time: why sh, when almost 20 years ago, at places I've worked, production shell scripts went from sh to ksh. It was only after I got into the CentOS world in '09 that I saw all the sh scripts again. mark
John R Pierce
2015-Apr-24 16:12 UTC
[CentOS] Real sh? Or other efficient shell for non-interactive scripts
On 4/24/2015 3:07 AM, E.B. wrote:> I'm sure most people here know about Dash in Debian. Have there > been discussions about providing a more efficient shell in Centos > for use with heavily invoked non-interactive scripts?perl or python are much better choices for complex scripts that need decent performance -- john r pierce, recycling bits in santa cruz
Les Mikesell
2015-Apr-24 16:20 UTC
[CentOS] Real sh? Or other efficient shell for non-interactive scripts
On Fri, Apr 24, 2015 at 11:12 AM, John R Pierce <pierce at hogranch.com> wrote:> On 4/24/2015 3:07 AM, E.B. wrote: >> >> I'm sure most people here know about Dash in Debian. Have there >> been discussions about providing a more efficient shell in Centos >> for use with heavily invoked non-interactive scripts? > > > > perl or python are much better choices for complex scripts that need decent > performance >Yes, the shell is great at launching other programs, redirecting i/o, creating pipes, expanding wildcard filenames and generally automating things with exactly the same syntax you'd use manually on the command line. But not so much at doing real computation itself. Even with perl if you have to do serious work you'll probably want modules that link in compiled C libraries. -- Les Mikesell lesmikesell at gmail.com
Gordon Messmer
2015-Apr-24 16:47 UTC
[CentOS] Real sh? Or other efficient shell for non-interactive scripts
On 04/24/2015 03:57 AM, Pete Geenhuizen wrote:> if you leave it out the script will run in whatever environment it > currently is in.I'm reasonably certain that a script with no shebang will run with /bin/sh. I interpret your statement to mean that if a user is using ksh and enters the path to such a script, it would also run in ksh. That would only be true if you "sourced" the script from your shell.
Lamar Owen
2015-Apr-27 15:42 UTC
[CentOS] Real sh? Or other efficient shell for non-interactive scripts
On 04/27/2015 06:43 AM, Joerg Schilling wrote:> I started with UNOS in 1982 as my first UNIX like. UNOS in fact was > the first UNIX clone and it was a real time OS. In February 1985, I > switched to a Sun....the first Sun that made it to Europe. J?rgCharles River UNOS was actually Tandy's first non-TRSDOS choice for the Model 16; Microsoft won the platform to Xenix by threatening to withhold BASIC and Multiplan for all other Tandy platforms if Tandy went UNOS [1]. Xenix on the 16 in 1987 was my first Un*x system (starring out a letter in Unix was to keep from trademark violations......) and 3B1 Convergent-written AT&T-labeled SVR2 was the second, with the oddball Apollo Domain/OS (change an environment variable and change the system from 4.2BSD to SVR3!) the third. A QIC-120 packaging of SLS by Mac's Place BBS was my fourth [2], and I've used Linux in some form ever since. How is this related to CentOS? Peripherally only, in that there was once a Project-16 newsletter post to comp.sys.tandy about the 16B made by one John M. Hughes (bang-path e-mail address of noao!coyote!moondog!proj16) back in January of 1991 [3].......I would love to come across a collection of these, as my main box at that time (running C-News) was a T6K with a pair of Rodime 70MB drives and a Maxtor XT-1140 140MB drive for the news spool. [1]: Post to comp.sys.tandy by Frank Durda IV on November 13, 2001, archived at http://www.dogpatch.com/misc/tandy_xenix_history.html among other places. A fun and grin-inducing read. [2]: Posting by John McNamara to comp.os.linux on April 6, 1993 subject: "Linux free by mail" (search on google groups for it) [3]: Posting to comp.sys.tandy by John Hughes, January 9, 1991 subject: "Project 16 - Tandy 16/6000 Newsletter and Mailing List"
Reasonably Related Threads
- Real sh? Or other efficient shell for non-interactive scripts
- Real sh? Or other efficient shell for non-interactive scripts
- Real sh? Or other efficient shell for non-interactive scripts
- Real sh? Or other efficient shell for non-interactive scripts
- Real sh? Or other efficient shell for non-interactive scripts