Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
On Mon, Dec 17, 2007 at 03:32:38PM -0500, Chuck Robey wrote: Jurjen Middendorp wrote: If you're familiar with pdksh, are you also familiar with ksh93, which is (I believe) Mr. Korn's own shell? If you are, I would be interessted in your opinion of the two, any comparisons you might give. I've never used ksh93 so I really can't say. There is a NOTES file included with pdksh which gives a starter. I created this port a few years ago because of some random issue I've long since forgotten with pdksh on my FreeBSD box which didn't happen on my OpenBSD box. tom I never used pdksh, but am using ksh93 for quite a while now and have used bash, too. For some reason i like it better than bash, the vi mode is a bit better somehow, it feels alot sturdier. It doesn't have those special variables like $! and !! i believe, but it has alot of neat features like -^ i ment !$ offcourse :) basic network programming, lots of parameter expansion stuff and is just a very nice shell :) I havre installed it, and played with it a bit, I admit it's nicer than sh (and I *think*, bash) but the reason I haven't tried using it regularly is because I can't find a nicely set up .kshrc ... if you have one, I'd appreciate a copy. Might be nice, if it's not terribly long, to post it to the list, too. Basically it's just like any other shell .*rc. It sets some environment variables for stuff, a bunch of aliases and some functions i find useful myself, or am too lazy to throw away. Nothing really ksh-specific, except maybe some of the functions i wrote use ksh-stuff like arrays, but that's not really ksh-specific as well. You could use google to find any .*rc for sh-like shells and copy those (or get a copy of unix power tools, it's a nice book to make you feel at home in a shell) -jurjen ps. these functions i probably use the most :) alias d=do_in_bg dillo alias x=do_in_bg xpdf alias ff=do_in_bg firefox #do a program in the background: do_in_bg() { $@ /dev/null 21 } #open a webpage from disk, like: $cd /usr/share/doc/en htm #to look at all the (english) freebsd-docs :) htm() { set -A stuff $(find -L . -name index.htm* -print) (for ((i=0; i ${#stuff[*]}; i++)); do print $i \t: ${stuff[i]}; done) | $PAGER read x d ${stuff[$x]} } ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
other BSDs for that matter. It being GPL guarantees that quite apart from it general suckiness. Can someone please explain why bash sucks? Everyone keep's saying this but I have never heard anyone explain why, other than the GPL issue. I really want to know. (This is not because I'm a bash fan. My personal favorite happens to be zsh.) I tried replacing /bin/bash with /bin/ksh on a Linux system and it almost completely broke it. Suggests the Linux folks can't write boot scripts without bashisms. If this is a poke at the use of #!/bin/sh when the script actually requires bash, I 100% agree. However, if your intent (and the intent of Chuck Robey in that earlier) post is to imply that it's bad programming practice to write anything than POSIX compatible scripts, then I have to ask again - why? This is kind of a pet peeve of mine, so here goes somewhat of a rant. Please enlighten me as to why I am wrong: I don't understand why everyone insists on POSIX compliance for portability with shell scripting. The POSIX common demoniator seems to suck. Seriously. One keeps seeing things like: if [ x$var = xvalue ] When the intent is: if [ $var = value ] Because there is presumably some wonky script out there that breaks on the former (or perhaps its POSIX, dunno). I have recently began to appreciate that all this madness that would normally be considered unforgivable code obfuscation in anything but shell scripting, is all an attempt to somehow be portable. In any number of situations I would consider it much preferable to juse choose one particular shell and stick to it, rather than having to do battle with all these minor incompatibilities. Many major shells are very portable to begin with, and in many situation you *REALLY* don't care about some exotic Unix platform that 10 people in the world run, but where bash/zsh/whatever doesn't. Another example of the madness is: http://www.netbsd.org/docs/pkgsrc/makefile.html Check out section 12.3.3. Can anyone claim that it is sensible for it to be this fricking difficult *to print the value of a variable*? Although that last bit has to do with more than the choice of a shell, it highlights perfectly the type of trouble you run into when you try to be portable with the least common denominator. -- / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller [EMAIL PROTECTED]' Key retrieval: Send an E-Mail to [EMAIL PROTECTED] E-Mail: [EMAIL PROTECTED] Web: http://www.scode.org signature.asc Description: This is a digitally signed message part.
Re: Apparently, csh programming is considered harmful.
On Mon, Dec 17, 2007 at 07:33:22PM +0100, Peter Schuller wrote: other BSDs for that matter. It being GPL guarantees that quite apart from it general suckiness. Can someone please explain why bash sucks? Everyone keep's saying this but I have never heard anyone explain why, other than the GPL issue. I really want to know. (This is not because I'm a bash fan. My personal favorite happens to be zsh.) Disclaimer: I haven't used bash for 5 years or so, so things might have improved. It used to suck then because it's vi-mode wasn't as good as other shells e.g pdksh, as someone else in this thread mentioned. It also had bugs in how it handled terminal escapes. The tragic thing was that these went on for years without a fix. It was also tremendously bloated at the time. Basically though, I bash bash out of habit :) although I seriously think that there are better shells out there and more people should use them. People seem to use bash and never try anything else. I tried replacing /bin/bash with /bin/ksh on a Linux system and it almost completely broke it. Suggests the Linux folks can't write boot scripts without bashisms. If this is a poke at the use of #!/bin/sh when the script actually requires bash, I 100% agree. Yeah, it was :) The scripts are lies. They say they use /bin/sh but actually use bash extensions. They only work because /bin/sh is a symlink to /bin/bash on Linux. However, if your intent (and the intent of Chuck Robey in that earlier) post is to imply that it's bad programming practice to write anything than POSIX compatible scripts, then I have to ask again - why? Every unix machine has sh, so if you write your scripts using that, you can transport your scripts between machines with a good idea that they will work without having your shell of choice installed with it's oddities extensions. This might be important where you've got a machine that you can't install your shell of choice, for whatever reason. It might be a rare circumstance but it's for similar reasons I also write all my letters documents in LaTeX. (No lock-in too). This is kind of a pet peeve of mine, so here goes somewhat of a rant. Please enlighten me as to why I am wrong: I don't understand why everyone insists on POSIX compliance for portability with shell scripting. The POSIX common demoniator seems to suck. Seriously. [snip] It's just for portability that I write to sh. If I'm doing anything vaguely complicated then I use perl instead, which is also pretty portable. And of course Bash primarily sucks because it's GPL which also sucks ;) My basic position: the license is too complicated and open to (mis)interpretation and it's not as free as BSD. Regards, -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
On Sun, Dec 16, 2007 at 07:21:23PM -0500, Tom McLaughlin wrote: On Sat, 2007-12-15 at 04:13 +0200, Giorgos Keramidas wrote: Hi Frank, Now that you mention pdksh, have you tried mksh (in Ports too)? I've installed it and successfully run moderately large ksh scripts (like the webrev(1) utility of OpenSolaris), and it is about an order of magnitude smaller than pdksh here: % [EMAIL PROTECTED]:/usr/local/bin$ ls -ld mksh bash ksh % -rwxr-xr-x 1 root wheel - 684699 Dec 9 19:51 bash % -r-xr-xr-x 1 root wheel - 2390645 Aug 31 17:07 ksh % -r-xr-xr-x 1 root wheel - 236202 Dec 9 18:34 mksh % [EMAIL PROTECTED]:/usr/local/bin$ ldd mksh bash ksh % mksh: % libc.so.7 = /lib/libc.so.7 (0x280ae000) % bash: % libncurses.so.7 = /lib/libncurses.so.7 (0x28101000) % libintl.so.8 = /usr/local/lib/libintl.so.8 (0x28144000) % libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28156000) % libc.so.7 = /lib/libc.so.7 (0x2824b000) % ldd: ksh: not a dynamic executable % [EMAIL PROTECTED]:/usr/local/bin$ I've maintained a port of OpenBSD's pdksh for some time but I've never committed it. Think of pdksh but still actively maintained. http://people.freebsd.org/~tmclaugh/files/openksh/openksh-4.2.shar [EMAIL PROTECTED] tom]$ ls -al /usr/local/bin/ksh -r-xr-xr-x 1 root wheel 192032 Dec 16 18:22 /usr/local/bin/ksh* tom I always assumed that the pdksh in ports had the OpenBSD patches in it. I've downloaded the shell archive and I'll build it. Any chance that you will commit this in the future? I'd almost certainly use it. Thanks for your work time, it's much appreciated! Regards, -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
Michaël Grünewald wrote: Chuck Robey [EMAIL PROTECTED] writes: As long as folks don't stop me from running whatever I want, I don't care if you use bash, but it really irks me, that most Linux systems are broken in that respect: Most of them break badly in random ways, if you don't run bash as your shell. A friend of mine who worked with debian was once in mood to disinstall BASH. Quite a trip to hell! (The story is 8 years old now.) From my own experiences merely trying to runit as a user shell, and not de-installing bash, I believe you ... I finally had to give it up as a bad job, and I'm known as a somewhat stubborn person, so that should tell you the level of problems I faced. Linux works only if you make their choices, just like their license. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
Jurjen Middendorp wrote: If you're familiar with pdksh, are you also familiar with ksh93, which is (I believe) Mr. Korn's own shell? If you are, I would be interessted in your opinion of the two, any comparisons you might give. I've never used ksh93 so I really can't say. There is a NOTES file included with pdksh which gives a starter. I created this port a few years ago because of some random issue I've long since forgotten with pdksh on my FreeBSD box which didn't happen on my OpenBSD box. tom I never used pdksh, but am using ksh93 for quite a while now and have used bash, too. For some reason i like it better than bash, the vi mode is a bit better somehow, it feels alot sturdier. It doesn't have those special variables like $! and !! i believe, but it has alot of neat features like basic network programming, lots of parameter expansion stuff and is just a very nice shell :) I havre installed it, and played with it a bit, I admit it's nicer than sh (and I *think*, bash) but the reason I haven't tried using it regularly is because I can't find a nicely set up .kshrc ... if you have one, I'd appreciate a copy. Might be nice, if it's not terribly long, to post it to the list, too. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
On Mon, 2007-12-17 at 19:38 +, Frank Shute wrote: On Sun, Dec 16, 2007 at 07:21:23PM -0500, Tom McLaughlin wrote: On Sat, 2007-12-15 at 04:13 +0200, Giorgos Keramidas wrote: Hi Frank, Now that you mention pdksh, have you tried mksh (in Ports too)? I've installed it and successfully run moderately large ksh scripts (like the webrev(1) utility of OpenSolaris), and it is about an order of magnitude smaller than pdksh here: % [EMAIL PROTECTED]:/usr/local/bin$ ls -ld mksh bash ksh % -rwxr-xr-x 1 root wheel - 684699 Dec 9 19:51 bash % -r-xr-xr-x 1 root wheel - 2390645 Aug 31 17:07 ksh % -r-xr-xr-x 1 root wheel - 236202 Dec 9 18:34 mksh % [EMAIL PROTECTED]:/usr/local/bin$ ldd mksh bash ksh % mksh: % libc.so.7 = /lib/libc.so.7 (0x280ae000) % bash: % libncurses.so.7 = /lib/libncurses.so.7 (0x28101000) % libintl.so.8 = /usr/local/lib/libintl.so.8 (0x28144000) % libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28156000) % libc.so.7 = /lib/libc.so.7 (0x2824b000) % ldd: ksh: not a dynamic executable % [EMAIL PROTECTED]:/usr/local/bin$ I've maintained a port of OpenBSD's pdksh for some time but I've never committed it. Think of pdksh but still actively maintained. http://people.freebsd.org/~tmclaugh/files/openksh/openksh-4.2.shar [EMAIL PROTECTED] tom]$ ls -al /usr/local/bin/ksh -r-xr-xr-x 1 root wheel 192032 Dec 16 18:22 /usr/local/bin/ksh* tom I always assumed that the pdksh in ports had the OpenBSD patches in it. I've downloaded the shell archive and I'll build it. Any chance that you will commit this in the future? I'd almost certainly use it. Thanks for your work time, it's much appreciated! Regards, Its always been a personal use thing but I'll look at adding it. I already checked on the name over on an OpenBSD list and no one cared. If anyone wants to autoconf it that would be really sweet. There's a patch version that works on Linux but both that release and this one require bmake. tom -- | tmclaugh at sdf.lonestar.org tmclaugh at FreeBSD.org | | FreeBSD http://www.FreeBSD.org | ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
Frank Shute wrote: On Sat, Dec 15, 2007 at 06:57:09AM -0500, Gerard Seibert wrote: On December 14, 2007 at 08:03PM Frank Shute wrote: On Fri, Dec 14, 2007 at 06:00:14PM -0500, Gerard Seibert wrote: On December 14, 2007 at 04:10PM Frank Shute wrote: [ snip ] I'm happy with sh as the system shell though; it's light weight: $ ls -l /bin/sh -r-xr-xr-x 1 root wheel 111028 Nov 30 00:10 /bin/sh ~ $ ls -l /bin/sh -r-xr-xr-x 1 root wheel 111788 Oct 5 13:55 /bin/sh* I can understand why the size of sh might be different. Different patch levels. (Built almost 2 months apart). $ ls -l /bin/ksh -r-xr-xr-x 1 root wheel 681584 Oct 6 12:33 /bin/ksh How about giving us all a laugh and posting the results for bash ;) ~ $ ls -l /usr/local/bin/bash -rwxr-xr-x 1 root wheel 643984 Sep 12 15:51 /usr/local/bin/bash* pdksh has put on weight. Used to be ~300k in the 4.* days and bash about 500k IIRC. On my machine bash is bigger than yours (newer version?): ~ $ bash --version bash --version GNU bash, version 3.2.25(0)-release (i386-portbld-freebsd6.2) Copyright (C) 2005 Free Software Foundation, Inc. Same as mine: $ bash --version GNU bash, version 3.2.25(0)-release (i386-portbld-freebsd6.2) Copyright (C) 2005 Free Software Foundation, Inc. I'm not too sure why my bash is different in size. I guess it sucked in slightly different code when built due to our base systems being the 2 months apart. [snip] Such differences can as well happen due to different CPUTYPE settings. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On 14/12/07 Giorgos Keramidas said: Tcsh is a fine shell. I'm using it all the time (that's how I found out that a buglet reported by Kris Kennaway a few months ago was indeed a bug which I could reproduce too). I always found csh/tcsh aliases annoying, since there are no shell functions. I also found the shell redirection awkward. It's ok otherwise, but I've since become addicted to bash. Mind you, I'm sure some tcsh users could point out some features that bash doesn't have. Mike -- Michael P. Soulier [EMAIL PROTECTED] Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. --Albert Einstein signature.asc Description: Digital signature
Re: Apparently, csh programming is considered harmful.
On 14/12/07 Giorgos Keramidas said: Do you have any _particular_ parts of the csh-whynot article that you would like to discuss, or this is a free for all flame? :) It's the lack of shell functions that gets me. Once a script reaches a certain size, I just move to Perl, Python, Tcl, Ruby, etc. Mike -- Michael P. Soulier [EMAIL PROTECTED] Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. --Albert Einstein signature.asc Description: Digital signature
Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
On Sat, 2007-12-15 at 04:13 +0200, Giorgos Keramidas wrote: On 2007-12-14 21:10, Frank Shute [EMAIL PROTECTED] wrote: I used bash for an interactive shell for about 5 years until I discovered the goodness of pdksh. About half the size, statically linked, not full of bugs and better editing features. Plus it's not GPL. Hi Frank, Now that you mention pdksh, have you tried mksh (in Ports too)? I've installed it and successfully run moderately large ksh scripts (like the webrev(1) utility of OpenSolaris), and it is about an order of magnitude smaller than pdksh here: % [EMAIL PROTECTED]:/usr/local/bin$ ls -ld mksh bash ksh % -rwxr-xr-x 1 root wheel - 684699 Dec 9 19:51 bash % -r-xr-xr-x 1 root wheel - 2390645 Aug 31 17:07 ksh % -r-xr-xr-x 1 root wheel - 236202 Dec 9 18:34 mksh % [EMAIL PROTECTED]:/usr/local/bin$ ldd mksh bash ksh % mksh: % libc.so.7 = /lib/libc.so.7 (0x280ae000) % bash: % libncurses.so.7 = /lib/libncurses.so.7 (0x28101000) % libintl.so.8 = /usr/local/lib/libintl.so.8 (0x28144000) % libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28156000) % libc.so.7 = /lib/libc.so.7 (0x2824b000) % ldd: ksh: not a dynamic executable % [EMAIL PROTECTED]:/usr/local/bin$ I've maintained a port of OpenBSD's pdksh for some time but I've never committed it. Think of pdksh but still actively maintained. http://people.freebsd.org/~tmclaugh/files/openksh/openksh-4.2.shar [EMAIL PROTECTED] tom]$ ls -al /usr/local/bin/ksh -r-xr-xr-x 1 root wheel 192032 Dec 16 18:22 /usr/local/bin/ksh* tom -- | tmclaugh at sdf.lonestar.org tmclaugh at FreeBSD.org | | FreeBSD http://www.FreeBSD.org | ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
Michael P. Soulier wrote: On 14/12/07 Giorgos Keramidas said: Tcsh is a fine shell. I'm using it all the time (that's how I found out that a buglet reported by Kris Kennaway a few months ago was indeed a bug which I could reproduce too). I always found csh/tcsh aliases annoying, since there are no shell functions. I also found the shell redirection awkward. There;s one item that is much more easily done in csh/tcsh than in the sh based ones that's redirecting the stderr along with the stdout. with tcsh, when I do a make, I commonly do a: make | tee makeout which causes both the stdout and stderr files to be redirected to the makeout make listing file. I;'ve never figured out any reasonably simple way to do that in any sh-like shell. Is there any simble way that you know of? It's ok otherwise, but I've since become addicted to bash. Mind you, I'm sure some tcsh users could point out some features that bash doesn't have. Mike ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On 16/12/07 Chuck Robey said: There;s one item that is much more easily done in csh/tcsh than in the sh based ones that's redirecting the stderr along with the stdout. with tcsh, when I do a make, I commonly do a: make | tee makeout which causes both the stdout and stderr files to be redirected to the makeout make listing file. I;'ve never figured out any reasonably simple way to do that in any sh-like shell. Is there any simble way that you know of? Yup. make 21 | tee makeout Now show me a simple way to redirect them to different files in csh. foo 1stdout.log 2stderr.log Mike -- Michael P. Soulier [EMAIL PROTECTED] Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. --Albert Einstein signature.asc Description: Digital signature
Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
Tom McLaughlin wrote: Now that you mention pdksh, have you tried mksh (in Ports too)? I've installed it and successfully run moderately large ksh scripts (like the webrev(1) utility of OpenSolaris), and it is about an order of magnitude smaller than pdksh here: % [EMAIL PROTECTED]:/usr/local/bin$ ls -ld mksh bash ksh % -rwxr-xr-x 1 root wheel - 684699 Dec 9 19:51 bash % -r-xr-xr-x 1 root wheel - 2390645 Aug 31 17:07 ksh % -r-xr-xr-x 1 root wheel - 236202 Dec 9 18:34 mksh % [EMAIL PROTECTED]:/usr/local/bin$ ldd mksh bash ksh % mksh: % libc.so.7 = /lib/libc.so.7 (0x280ae000) % bash: % libncurses.so.7 = /lib/libncurses.so.7 (0x28101000) % libintl.so.8 = /usr/local/lib/libintl.so.8 (0x28144000) % libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28156000) % libc.so.7 = /lib/libc.so.7 (0x2824b000) % ldd: ksh: not a dynamic executable % [EMAIL PROTECTED]:/usr/local/bin$ I've maintained a port of OpenBSD's pdksh for some time but I've never committed it. Think of pdksh but still actively maintained. http://people.freebsd.org/~tmclaugh/files/openksh/openksh-4.2.shar [EMAIL PROTECTED] tom]$ ls -al /usr/local/bin/ksh -r-xr-xr-x 1 root wheel 192032 Dec 16 18:22 /usr/local/bin/ksh* If you're familiar with pdksh, are you also familiar with ksh93, which is (I believe) Mr. Korn's own shell? If you are, I would be interessted in your opinion of the two, any comparisons you might give. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
On Sun, 2007-12-16 at 22:26 -0500, Chuck Robey wrote: Tom McLaughlin wrote: Now that you mention pdksh, have you tried mksh (in Ports too)? I've installed it and successfully run moderately large ksh scripts (like the webrev(1) utility of OpenSolaris), and it is about an order of magnitude smaller than pdksh here: % [EMAIL PROTECTED]:/usr/local/bin$ ls -ld mksh bash ksh % -rwxr-xr-x 1 root wheel - 684699 Dec 9 19:51 bash % -r-xr-xr-x 1 root wheel - 2390645 Aug 31 17:07 ksh % -r-xr-xr-x 1 root wheel - 236202 Dec 9 18:34 mksh % [EMAIL PROTECTED]:/usr/local/bin$ ldd mksh bash ksh % mksh: % libc.so.7 = /lib/libc.so.7 (0x280ae000) % bash: % libncurses.so.7 = /lib/libncurses.so.7 (0x28101000) % libintl.so.8 = /usr/local/lib/libintl.so.8 (0x28144000) % libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28156000) % libc.so.7 = /lib/libc.so.7 (0x2824b000) % ldd: ksh: not a dynamic executable % [EMAIL PROTECTED]:/usr/local/bin$ I've maintained a port of OpenBSD's pdksh for some time but I've never committed it. Think of pdksh but still actively maintained. http://people.freebsd.org/~tmclaugh/files/openksh/openksh-4.2.shar [EMAIL PROTECTED] tom]$ ls -al /usr/local/bin/ksh -r-xr-xr-x 1 root wheel 192032 Dec 16 18:22 /usr/local/bin/ksh* If you're familiar with pdksh, are you also familiar with ksh93, which is (I believe) Mr. Korn's own shell? If you are, I would be interessted in your opinion of the two, any comparisons you might give. I've never used ksh93 so I really can't say. There is a NOTES file included with pdksh which gives a starter. I created this port a few years ago because of some random issue I've long since forgotten with pdksh on my FreeBSD box which didn't happen on my OpenBSD box. tom -- | tmclaugh at sdf.lonestar.org tmclaugh at FreeBSD.org | | FreeBSD http://www.FreeBSD.org | ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
Michael P. Soulier wrote: On 16/12/07 Chuck Robey said: There;s one item that is much more easily done in csh/tcsh than in the sh based ones that's redirecting the stderr along with the stdout. with tcsh, when I do a make, I commonly do a: make | tee makeout which causes both the stdout and stderr files to be redirected to the makeout make listing file. I;'ve never figured out any reasonably simple way to do that in any sh-like shell. Is there any simble way that you know of? Yup. make 21 | tee makeout Now show me a simple way to redirect them to different files in csh. foo 1stdout.log 2stderr.log Mike Believe it or not, I was actually trying to get information, not trying to make a point illustrating things. I wasn't aware that you could mix the redirection modes but I just tested this, it does actually work, in both bash and sh. Keen, I'll stow that guy away, because I've been asking that on occaison for years now.. Your question sounded to me like a back-handed way to illustrate something, but I'm not all that deep. I've never run into the need to do that redirect in tcsh, so I don't know how to do it. I'm maybe justr a bit curious where you needed it, but I haven't an answer. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
Chuck Robey [EMAIL PROTECTED] writes: As long as folks don't stop me from running whatever I want, I don't care if you use bash, but it really irks me, that most Linux systems are broken in that respect: Most of them break badly in random ways, if you don't run bash as your shell. A friend of mine who worked with debian was once in mood to disinstall BASH. Quite a trip to hell! (The story is 8 years old now.) -- Cheers, Michaël ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
On Sun, Dec 16, 2007 at 11:34:50PM -0500, Tom McLaughlin wrote: On Sun, 2007-12-16 at 22:26 -0500, Chuck Robey wrote: Tom McLaughlin wrote: Now that you mention pdksh, have you tried mksh (in Ports too)? I've installed it and successfully run moderately large ksh scripts (like the webrev(1) utility of OpenSolaris), and it is about an order of magnitude smaller than pdksh here: % [EMAIL PROTECTED]:/usr/local/bin$ ls -ld mksh bash ksh % -rwxr-xr-x 1 root wheel - 684699 Dec 9 19:51 bash % -r-xr-xr-x 1 root wheel - 2390645 Aug 31 17:07 ksh % -r-xr-xr-x 1 root wheel - 236202 Dec 9 18:34 mksh % [EMAIL PROTECTED]:/usr/local/bin$ ldd mksh bash ksh % mksh: % libc.so.7 = /lib/libc.so.7 (0x280ae000) % bash: % libncurses.so.7 = /lib/libncurses.so.7 (0x28101000) % libintl.so.8 = /usr/local/lib/libintl.so.8 (0x28144000) % libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28156000) % libc.so.7 = /lib/libc.so.7 (0x2824b000) % ldd: ksh: not a dynamic executable % [EMAIL PROTECTED]:/usr/local/bin$ I've maintained a port of OpenBSD's pdksh for some time but I've never committed it. Think of pdksh but still actively maintained. http://people.freebsd.org/~tmclaugh/files/openksh/openksh-4.2.shar [EMAIL PROTECTED] tom]$ ls -al /usr/local/bin/ksh -r-xr-xr-x 1 root wheel 192032 Dec 16 18:22 /usr/local/bin/ksh* If you're familiar with pdksh, are you also familiar with ksh93, which is (I believe) Mr. Korn's own shell? If you are, I would be interessted in your opinion of the two, any comparisons you might give. I've never used ksh93 so I really can't say. There is a NOTES file included with pdksh which gives a starter. I created this port a few years ago because of some random issue I've long since forgotten with pdksh on my FreeBSD box which didn't happen on my OpenBSD box. tom I never used pdksh, but am using ksh93 for quite a while now and have used bash, too. For some reason i like it better than bash, the vi mode is a bit better somehow, it feels alot sturdier. It doesn't have those special variables like $! and !! i believe, but it has alot of neat features like basic network programming, lots of parameter expansion stuff and is just a very nice shell :) -jurjen ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On 2007-12-16 19:36, Chuck Robey [EMAIL PROTECTED] wrote: Michael P. Soulier wrote: On 14/12/07 Giorgos Keramidas said: Tcsh is a fine shell. I'm using it all the time (that's how I found out that a buglet reported by Kris Kennaway a few months ago was indeed a bug which I could reproduce too). I always found csh/tcsh aliases annoying, since there are no shell functions. I also found the shell redirection awkward. There;s one item that is much more easily done in csh/tcsh than in the sh based ones that's redirecting the stderr along with the stdout. with tcsh, when I do a make, I commonly do a: make | tee makeout which causes both the stdout and stderr files to be redirected to the makeout make listing file. I;'ve never figured out any reasonably simple way to do that in any sh-like shell. Is there any simble way that you know of? Yep, there is a simple way in sh too: make 21 | tee makeout ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On December 14, 2007 at 08:03PM Frank Shute wrote: On Fri, Dec 14, 2007 at 06:00:14PM -0500, Gerard Seibert wrote: On December 14, 2007 at 04:10PM Frank Shute wrote: [ snip ] I'm happy with sh as the system shell though; it's light weight: $ ls -l /bin/sh -r-xr-xr-x 1 root wheel 111028 Nov 30 00:10 /bin/sh ~ $ ls -l /bin/sh -r-xr-xr-x 1 root wheel 111788 Oct 5 13:55 /bin/sh* $ ls -l /bin/ksh -r-xr-xr-x 1 root wheel 681584 Oct 6 12:33 /bin/ksh How about giving us all a laugh and posting the results for bash ;) ~ $ ls -l /usr/local/bin/bash -rwxr-xr-x 1 root wheel 643984 Sep 12 15:51 /usr/local/bin/bash* pdksh has put on weight. Used to be ~300k in the 4.* days and bash about 500k IIRC. On my machine bash is bigger than yours (newer version?): ~ $ bash --version bash --version GNU bash, version 3.2.25(0)-release (i386-portbld-freebsd6.2) Copyright (C) 2005 Free Software Foundation, Inc. $ ls -l /usr/local/bin/bash -rwxr-xr-x 1 root wheel 676752 Nov 9 11:57 /usr/local/bin/bash Don't know why bash is writable by root but sh ksh aren't. Seems like I've ended up with bash installed whether I like it or not: $ pkg_info -R bash-3.2.25 Information for bash-3.2.25: Required by: gnome-doc-utils-0.12.0 libgnome-2.20.1.1_1 rarian-0.6.0_1 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
On Sat, Dec 15, 2007 at 04:13:49AM +0200, Giorgos Keramidas wrote: On 2007-12-14 21:10, Frank Shute [EMAIL PROTECTED] wrote: I used bash for an interactive shell for about 5 years until I discovered the goodness of pdksh. About half the size, statically linked, not full of bugs and better editing features. Plus it's not GPL. Hi Frank, Now that you mention pdksh, have you tried mksh (in Ports too)? No I haven't but I'll certainly give it a look. I've just upgraded my window manager: blackbox - fluxbox, so I might aswell upgrade my shell ;) I've installed it and successfully run moderately large ksh scripts (like the webrev(1) utility of OpenSolaris), and it is about an order of magnitude smaller than pdksh here: Sounds good, thanks for the tip Giorgos. % [EMAIL PROTECTED]:/usr/local/bin$ ls -ld mksh bash ksh % -rwxr-xr-x 1 root wheel - 684699 Dec 9 19:51 bash % -r-xr-xr-x 1 root wheel - 2390645 Aug 31 17:07 ksh % -r-xr-xr-x 1 root wheel - 236202 Dec 9 18:34 mksh Wow. My pdksh is much smaller: $ ls -ld /usr/local/bin/ksh -r-xr-xr-x 1 root wheel 681584 Jan 23 2007 /usr/local/bin/ksh $ pkg_info -W /usr/local/bin/ksh /usr/local/bin/ksh was installed by package pdksh-5.2.14p2_2 It's also statically compiled. I wonder what is bloating yours so much. Was it built with debugging code or something? % [EMAIL PROTECTED]:/usr/local/bin$ ldd mksh bash ksh % mksh: % libc.so.7 = /lib/libc.so.7 (0x280ae000) % bash: % libncurses.so.7 = /lib/libncurses.so.7 (0x28101000) % libintl.so.8 = /usr/local/lib/libintl.so.8 (0x28144000) % libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28156000) % libc.so.7 = /lib/libc.so.7 (0x2824b000) % ldd: ksh: not a dynamic executable % [EMAIL PROTECTED]:/usr/local/bin$ -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On Sat, Dec 15, 2007 at 06:57:09AM -0500, Gerard Seibert wrote: On December 14, 2007 at 08:03PM Frank Shute wrote: On Fri, Dec 14, 2007 at 06:00:14PM -0500, Gerard Seibert wrote: On December 14, 2007 at 04:10PM Frank Shute wrote: [ snip ] I'm happy with sh as the system shell though; it's light weight: $ ls -l /bin/sh -r-xr-xr-x 1 root wheel 111028 Nov 30 00:10 /bin/sh ~ $ ls -l /bin/sh -r-xr-xr-x 1 root wheel 111788 Oct 5 13:55 /bin/sh* I can understand why the size of sh might be different. Different patch levels. (Built almost 2 months apart). $ ls -l /bin/ksh -r-xr-xr-x 1 root wheel 681584 Oct 6 12:33 /bin/ksh How about giving us all a laugh and posting the results for bash ;) ~ $ ls -l /usr/local/bin/bash -rwxr-xr-x 1 root wheel 643984 Sep 12 15:51 /usr/local/bin/bash* pdksh has put on weight. Used to be ~300k in the 4.* days and bash about 500k IIRC. On my machine bash is bigger than yours (newer version?): ~ $ bash --version bash --version GNU bash, version 3.2.25(0)-release (i386-portbld-freebsd6.2) Copyright (C) 2005 Free Software Foundation, Inc. Same as mine: $ bash --version GNU bash, version 3.2.25(0)-release (i386-portbld-freebsd6.2) Copyright (C) 2005 Free Software Foundation, Inc. I'm not too sure why my bash is different in size. I guess it sucked in slightly different code when built due to our base systems being the 2 months apart. [snip] -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
On 2007-12-15 13:54, Frank Shute [EMAIL PROTECTED] wrote: % [EMAIL PROTECTED]:/usr/local/bin$ ls -ld mksh bash ksh % -rwxr-xr-x 1 root wheel - 684699 Dec 9 19:51 bash % -r-xr-xr-x 1 root wheel - 2390645 Aug 31 17:07 ksh % -r-xr-xr-x 1 root wheel - 236202 Dec 9 18:34 mksh Wow. My pdksh is much smaller: $ ls -ld /usr/local/bin/ksh -r-xr-xr-x 1 root wheel 681584 Jan 23 2007 /usr/local/bin/ksh $ pkg_info -W /usr/local/bin/ksh /usr/local/bin/ksh was installed by package pdksh-5.2.14p2_2 It's also statically compiled. I wonder what is bloating yours so much. Was it built with debugging code or something? Yes. All my ports are build with DEBUG_FLAGS='-g' this time, so it may be the cause of the pdksh bloat. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On Fri, 14 Dec 2007 00:09:41 -0700 Chad Perrin [EMAIL PROTECTED] wrote: Hmm -- fair answer. I was kind of thinking that on FreeBSD I should maybe do such work in csh as the standard shell, but it occurs to me that I'd probably be pretty hard-pressed to find a FreeBSD system without sh on it. csh isn't the standard shell, it's just the default login shell for root. All of the installed shell scripts are for sh, and the sysinstall default for ordinary users is sh. I think it's just the case that sysinstall doesn't have normal user setup page for the root account, so it's sets a sensible default shell for interactive use. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
Matt LaPlante wrote: On Dec 13, 2007 9:59 PM, Chuck Robey [EMAIL PROTECTED] wrote: Giorgos Keramidas wrote: On 2007-12-13 18:05, Chad Perrin [EMAIL PROTECTED] wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful That was written sometime last millenium, I mean, it's REALLY old. The question is sort of flamebait (you ought to go ask it on, say, the Linux IRC channel, for well-reasoned, adult discussion (NOT!) One could argue that making irrelevant, potentially insulting statements about alternative operating systems is: - not adult - not well-reasoned - flamebait And you took it ;-) --- don't read too much into his words. IRC is the hottest flame war protocol on the planet, and you're more likely to have large numbers of $any_type_person on a channel with a large number of users anyway; since Linux has more users than BSD, it makes sense to me. Chuck said, Go to a Linux IRC channel with this question and watch for something that rivals the Great Chicago Fire happen in 2 seconds. He could have easily said ##freebsd on Freenode, but it'd have been a smaller and cooler flame war. He didn't say Tux Sucks. Kevin Kinsey -- There are really not many jobs that actually require a penis or a vagina, and all other occupations should be open to everyone. -- Gloria Steinem ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
Jerry McAllister wrote: On Thu, Dec 13, 2007 at 08:12:32PM -0500, Mike Jeays wrote: On December 13, 2007 08:05:42 pm Chad Perrin wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). As you can see, it is 11 years old, but still good advice. For interactive use, tcsh is not too bad, but for writing scripts of any length, sh or bash are considered better tools. For code that will run anywhere, stick to the sh subset. flamebaitBash has all the features one is likely to need for interactive use as well, and one could make a good case for it being the 'standard' shell now./flamebait Here it is. I find bash to be ugly and hate it for interactive use. I would rather just use /bin/sh. As long as folks don't stop me from running whatever I want, I don't care if you use bash, but it really irks me, that most Linux systems are broken in that respect: Most of them break badly in random ways, if you don't run bash as your shell. That's poor programming practice, but the Linux programmers, since they all run bash themselves, they don't see the results of their errors, and they all claim its not a problem. Try running tcsh there, you'll see what I mean reasonably soon, when you begin to get random weirdnesses... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On Fri, Dec 14, 2007 at 02:26:28PM +, RW wrote: On Fri, 14 Dec 2007 00:09:41 -0700 Chad Perrin [EMAIL PROTECTED] wrote: Hmm -- fair answer. I was kind of thinking that on FreeBSD I should maybe do such work in csh as the standard shell, but it occurs to me that I'd probably be pretty hard-pressed to find a FreeBSD system without sh on it. csh isn't the standard shell, it's just the default login shell for root. All of the installed shell scripts are for sh, and the sysinstall default for ordinary users is sh. I think it's just the case that sysinstall doesn't have normal user setup page for the root account, so it's sets a sensible default shell for interactive use. Thanks for clarifying that point. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Kent Beck: I always knew that one day Smalltalk would replace Java. I just didn't know it would be called Ruby. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On Thu, Dec 13, 2007 at 08:12:32PM -0500, Mike Jeays wrote: On December 13, 2007 08:05:42 pm Chad Perrin wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). As you can see, it is 11 years old, but still good advice. For interactive use, tcsh is not too bad, but for writing scripts of any length, sh or bash are considered better tools. For code that will run anywhere, stick to the sh subset. flamebaitBash has all the features one is likely to need for interactive use as well, and one could make a good case for it being the 'standard' shell now./flamebait Standard shell for what? Linux maybe but not FreeBSD or any of the other BSDs for that matter. It being GPL guarantees that quite apart from it general suckiness. I used bash for an interactive shell for about 5 years until I discovered the goodness of pdksh. About half the size, statically linked, not full of bugs and better editing features. Plus it's not GPL. I tried replacing /bin/bash with /bin/ksh on a Linux system and it almost completely broke it. Suggests the Linux folks can't write boot scripts without bashisms. I'm tempted to try doing the same on FreeBSD (replace sh with pdksh) just for the hell of it and see what happens. I'm happy with sh as the system shell though; it's light weight: $ ls -l /bin/sh -r-xr-xr-x 1 root wheel 111028 Nov 30 00:10 /bin/sh $ ls -l /bin/ksh -r-xr-xr-x 1 root wheel 681584 Oct 6 12:33 /bin/ksh How about giving us all a laugh and posting the results for bash ;) /flamebait -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On December 14, 2007 at 04:10PM Frank Shute wrote: [ snip ] I'm happy with sh as the system shell though; it's light weight: $ ls -l /bin/sh -r-xr-xr-x 1 root wheel 111028 Nov 30 00:10 /bin/sh $ ls -l /bin/ksh -r-xr-xr-x 1 root wheel 681584 Oct 6 12:33 /bin/ksh How about giving us all a laugh and posting the results for bash ;) ~ $ ls -l /usr/local/bin/bash -rwxr-xr-x 1 root wheel 643984 Sep 12 15:51 /usr/local/bin/bash* -- Gerard ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On Fri, Dec 14, 2007 at 06:00:14PM -0500, Gerard Seibert wrote: On December 14, 2007 at 04:10PM Frank Shute wrote: [ snip ] I'm happy with sh as the system shell though; it's light weight: $ ls -l /bin/sh -r-xr-xr-x 1 root wheel 111028 Nov 30 00:10 /bin/sh $ ls -l /bin/ksh -r-xr-xr-x 1 root wheel 681584 Oct 6 12:33 /bin/ksh How about giving us all a laugh and posting the results for bash ;) ~ $ ls -l /usr/local/bin/bash -rwxr-xr-x 1 root wheel 643984 Sep 12 15:51 /usr/local/bin/bash* pdksh has put on weight. Used to be ~300k in the 4.* days and bash about 500k IIRC. On my machine bash is bigger than yours (newer version?): $ ls -l /usr/local/bin/bash -rwxr-xr-x 1 root wheel 676752 Nov 9 11:57 /usr/local/bin/bash Don't know why bash is writable by root but sh ksh aren't. Seems like I've ended up with bash installed whether I like it or not: $ pkg_info -R bash-3.2.25 Information for bash-3.2.25: Required by: gnome-doc-utils-0.12.0 libgnome-2.20.1.1_1 rarian-0.6.0_1 :( -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]
On 2007-12-14 21:10, Frank Shute [EMAIL PROTECTED] wrote: I used bash for an interactive shell for about 5 years until I discovered the goodness of pdksh. About half the size, statically linked, not full of bugs and better editing features. Plus it's not GPL. Hi Frank, Now that you mention pdksh, have you tried mksh (in Ports too)? I've installed it and successfully run moderately large ksh scripts (like the webrev(1) utility of OpenSolaris), and it is about an order of magnitude smaller than pdksh here: % [EMAIL PROTECTED]:/usr/local/bin$ ls -ld mksh bash ksh % -rwxr-xr-x 1 root wheel - 684699 Dec 9 19:51 bash % -r-xr-xr-x 1 root wheel - 2390645 Aug 31 17:07 ksh % -r-xr-xr-x 1 root wheel - 236202 Dec 9 18:34 mksh % [EMAIL PROTECTED]:/usr/local/bin$ ldd mksh bash ksh % mksh: % libc.so.7 = /lib/libc.so.7 (0x280ae000) % bash: % libncurses.so.7 = /lib/libncurses.so.7 (0x28101000) % libintl.so.8 = /usr/local/lib/libintl.so.8 (0x28144000) % libiconv.so.3 = /usr/local/lib/libiconv.so.3 (0x28156000) % libc.so.7 = /lib/libc.so.7 (0x2824b000) % ldd: ksh: not a dynamic executable % [EMAIL PROTECTED]:/usr/local/bin$ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On Thu, Dec 13, 2007 at 08:12:32PM -0500, Mike Jeays wrote: On December 13, 2007 08:05:42 pm Chad Perrin wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). As you can see, it is 11 years old, but still good advice. For interactive use, tcsh is not too bad, but for writing scripts of any length, sh or bash are considered better tools. For code that will run anywhere, stick to the sh subset. flamebaitBash has all the features one is likely to need for interactive use as well, and one could make a good case for it being the 'standard' shell now./flamebait Here it is. I find bash to be ugly and hate it for interactive use. I would rather just use /bin/sh. jerry -- Mike Jeays http://www.jeays.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
Chad Perrin wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). If you really want to troll, there's a unix haters handbook available as a pdf out there (stw) -R ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
Jerry McAllister wrote: flamebaitBash has all the features one is likely to need for interactive use as well, and one could make a good case for it being the 'standard' shell now./flamebait Yeah, right... when Penguins Fly (hahahaha) [that was intended as a joke and dumb linux reference] I find bash to be ugly and hate it for interactive use. I would rather just use /bin/sh. jerry Seriously, Jerry, what do you dislike about it? If you ignore its features, it's no different from sh that I've seen. -R ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Apparently, csh programming is considered harmful.
I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Isaac Asimov: Part of the inhumanity of the computer is that, once it is completely programmed and working smoothly, it is completely honest. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On December 13, 2007 08:05:42 pm Chad Perrin wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). As you can see, it is 11 years old, but still good advice. For interactive use, tcsh is not too bad, but for writing scripts of any length, sh or bash are considered better tools. For code that will run anywhere, stick to the sh subset. flamebaitBash has all the features one is likely to need for interactive use as well, and one could make a good case for it being the 'standard' shell now./flamebait -- Mike Jeays http://www.jeays.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On 2007-12-13 18:05, Chad Perrin [EMAIL PROTECTED] wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). Most of the points made in the FAQ about scripting large `applications' with csh ring a bell for me. Now, having said that, /bin/sh is nice for small to medium-sized scripts, but there is a certain point where even sh(1) becomes annoying. Do you have any _particular_ parts of the csh-whynot article that you would like to discuss, or this is a free for all flame? :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On Thu, 13 Dec 2007, Chad Perrin wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). I like csh/tcsh as a shell, but don't use it to run scripts. /bin/sh is the One True Shell Script Interpreter; heathen bashisms are just as bad as csh constructs. When you can't use a higher-level language (Perubython), use shell scripts. But stick to plain sh, because if it's useful you'll probably end up having to convert it to sh anyway. -Warren Block * Rapid City, South Dakota USA ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On Dec 13, 2007 9:59 PM, Chuck Robey [EMAIL PROTECTED] wrote: Giorgos Keramidas wrote: On 2007-12-13 18:05, Chad Perrin [EMAIL PROTECTED] wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful That was written sometime last millenium, I mean, it's REALLY old. The question is sort of flamebait (you ought to go ask it on, say, the Linux IRC channel, for well-reasoned, adult discussion (NOT!) One could argue that making irrelevant, potentially insulting statements about alternative operating systems is: - not adult - not well-reasoned - flamebait In general, it's right, you really wouldn't want to use tcsh as a scripting language. Read it, you'll come out ahead, but understand, that tcsh is a heck of a good general purpose command shell for users. I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). Most of the points made in the FAQ about scripting large `applications' with csh ring a bell for me. Now, having said that, /bin/sh is nice for small to medium-sized scripts, but there is a certain point where even sh(1) becomes annoying. Do you have any _particular_ parts of the csh-whynot article that you would like to discuss, or this is a free for all flame? :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
Giorgos Keramidas wrote: On 2007-12-13 18:05, Chad Perrin [EMAIL PROTECTED] wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful That was written sometime last millenium, I mean, it's REALLY old. The question is sort of flamebait (you ought to go ask it on, say, the Linux IRC channel, for well-reasoned, adult discussion (NOT!) In general, it's right, you really wouldn't want to use tcsh as a scripting language. Read it, you'll come out ahead, but understand, that tcsh is a heck of a good general purpose command shell for users. I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). Most of the points made in the FAQ about scripting large `applications' with csh ring a bell for me. Now, having said that, /bin/sh is nice for small to medium-sized scripts, but there is a certain point where even sh(1) becomes annoying. Do you have any _particular_ parts of the csh-whynot article that you would like to discuss, or this is a free for all flame? :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On 2007-12-13 21:59, Chuck Robey [EMAIL PROTECTED] wrote: Giorgos Keramidas wrote: On 2007-12-13 18:05, Chad Perrin [EMAIL PROTECTED] wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful That was written sometime last millenium, I mean, it's REALLY old. The question is sort of flamebait (you ought to go ask it on, say, the Linux IRC channel, for well-reasoned, adult discussion (NOT!) In general, it's right, you really wouldn't want to use tcsh as a scripting language. Read it, you'll come out ahead, but understand, that tcsh is a heck of a good general purpose command shell for users. Tcsh is a fine shell. I'm using it all the time (that's how I found out that a buglet reported by Kris Kennaway a few months ago was indeed a bug which I could reproduce too). I just don't like it for scripting :-) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Apparently, csh programming is considered harmful.
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Mike Jeays Sent: Thursday, December 13, 2007 5:13 PM To: FreeBSD Questions Subject: Re: Apparently, csh programming is considered harmful. flamebaitBash has all the features one is likely to need for interactive use as well, and one could make a good case for it being the 'standard' shell now./flamebait The standard shell MUST be able to be statically compiled. You don't have access to all your nice dynamically loaded libraries when the only filesystem on your server that will mount is /, due to some disk error. Ted No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.17.1/1183 - Release Date: 12/13/2007 9:15 AM ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On Fri, Dec 14, 2007 at 04:25:30AM +0200, Giorgos Keramidas wrote: On 2007-12-13 18:05, Chad Perrin [EMAIL PROTECTED] wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). Most of the points made in the FAQ about scripting large `applications' with csh ring a bell for me. Now, having said that, /bin/sh is nice for small to medium-sized scripts, but there is a certain point where even sh(1) becomes annoying. Do you have any _particular_ parts of the csh-whynot article that you would like to discuss, or this is a free for all flame? :) It's a free-for-all -- but not really a flame. I was looking for some general opinions and insights on the matter. As I said, I'm still not exactly a tcsh expert (though, in general, I find I like it more than bash as my command shell). I don't generally like using any of the common shells for real programming, anyway. Anything beyond just automating a few commands so I don't get RSI, I tend to go with Perl or Ruby for scripting. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Kent Beck: I always knew that one day Smalltalk would replace Java. I just didn't know it would be called Ruby. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apparently, csh programming is considered harmful.
On Thu, Dec 13, 2007 at 07:42:35PM -0700, Warren Block wrote: On Thu, 13 Dec 2007, Chad Perrin wrote: I ran across this today: http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ Title: Csh Programming Considered Harmful I wonder what responses I might get here, and how much of this applies to tcsh as well (I'm still not exactly a tcsh expert). I like csh/tcsh as a shell, but don't use it to run scripts. /bin/sh is the One True Shell Script Interpreter; heathen bashisms are just as bad as csh constructs. When you can't use a higher-level language (Perubython), use shell scripts. But stick to plain sh, because if it's useful you'll probably end up having to convert it to sh anyway. Hmm -- fair answer. I was kind of thinking that on FreeBSD I should maybe do such work in csh as the standard shell, but it occurs to me that I'd probably be pretty hard-pressed to find a FreeBSD system without sh on it. . . . and I *do* use Perubython (or rather, Perubyl) for anything complex enough to use more than one or two conditionals in it. I haven't met a shell (other than one derived from a general purpose programming language) yet that doesn't annoy me beyond that level of complexity for scripting. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] John W. Russell: People point. Sometimes that's just easier. They also use words. Sometimes that's just easier. For the same reasons that pointing has not made words obsolete, there will always be command lines. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]