From christos at zoulas.com Thu Sep 1 09:47:42 2022 From: christos at zoulas.com (Christos Zoulas) Date: Thu, 1 Sep 2022 12:47:42 +0300 Subject: [Tcsh] Compliments to the developers and contributors. In-Reply-To: References: Message-ID: <461353CC-1FDE-41ED-BEB8-95B6C6848451@zoulas.com> There are lots of problems and races in the way csh (and tcsh) evaluates commands and pipelines. Some of them are really hard to fix (see https://bugs.astron.com ). Also parsing is not robust since the shell only recognizes keywords at the beginning of lines in some cases... Best, christos > On Aug 31, 2022, at 6:01 PM, M G P wrote: > > I wrote a guide on how to use the C Shell, in the hope it'll serve as a guide on how to adequately write scripts, as well as to encourage people on not giving up: https://gist.github.com/Krush206/bfcfd760be645150bb247f051e98c9d3 > > > > > From: Tcsh on behalf of M G P > Sent: Tuesday, August 16, 2022 1:20:16 PM > To: tcsh at astron.com > Subject: Re: [Tcsh] Compliments to the developers and contributors. > > > > > https://en.m.wikipedia.org/wiki/Special:MobileDiff/1102822365 > Why do they think multi-line aliases aren't possible? > > alias function 'if -e \!$ then\ > > echo OK\ > > else\ > > echo Not OK\ > > endif' > > function dir > > > > I can also make it into a variable: > > set function = 'if -e \!$ then\ > > echo OK\ > > else\ > > echo Not OK\ > > endif\ > > :' > > eval $function:q dir > > > > > > > From: Tcsh on behalf of M G P > Sent: Monday, January 31, 2022, 05:52 > To: tcsh at astron.com > Subject: Re: [Tcsh] Compliments to the developers and contributors. > > > And I'm very proud to find another, better workaround to the criticism in the Wikipedia webpage: > > # Always creates an empty file > > if (! -e myfile) echo mytext > myfile > > # Workaround > > if (! -e myfile) eval "echo mytext > myfile" > > My workaround : > > ( ( : < myfile ) >& /dev/null && echo File exists. ) || ( ( echo mytext > myfile ) >& /dev/null && echo File created. ) || ( echo Cannot create file. ) > > > > > > > > > From: Tcsh on behalf of M G P > Sent: Wednesday, December 22, 2021, 03:05 > To: tcsh at astron.com > Subject: [Tcsh] Compliments to the developers and contributors. > > > Hello. > > Just did like to leave a comment in here, thanking the developers and contributors of Tcsh. > > > > The C Shell is such a brilliant work from Bill Joy, and Tcsh makes a great enhancement and continuation to it. Furthermore, the C Shell is the only Shell out there which resembles the Thompson and Mashey Shells, which (unfortunately) were superseded by the Bourne Shell. > > > > I'm not a long-time Tcsh user, however, after learning it, it really fascinated me - so much that I keep wondering how some dislike it. > > To be fair, Tcsh taught me how to write scripts with security in mind, due its "limitations". The "limitations" imposed by the C Shell make it one of the most reliable Shells to work with, and I should not complain, but thank for that. (E.g: nesting commands is impossible; there are better ways to achieve what one want, without nesting commands.) > > > > I really have no complaints to C Shell or Tcsh, but I must thank each of you who keep the development of an old brilliant gem from Bill Joy and Ken Greer up. > > Thank you very much for your time and effort! > > > > P.S: the complaints from a Perl developer in faqs.org are plain petty; something I learned very quickly is that most things can be worked-around with sub-shells or named FIFOs. > > > > > > > > -- > Tcsh mailing list > Tcsh at astron.com > https://mailman.astron.com/mailman/listinfo/tcsh > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 235 bytes Desc: Message signed with OpenPGP URL: From christos at zoulas.com Thu Sep 1 12:21:24 2022 From: christos at zoulas.com (Christos Zoulas) Date: Thu, 1 Sep 2022 15:21:24 +0300 Subject: [Tcsh] Compliments to the developers and contributors. In-Reply-To: References: <461353CC-1FDE-41ED-BEB8-95B6C6848451@zoulas.com> Message-ID: It is not bad at all :-) I've been using it for more than 40 years... It is great for command line use, but not good for scripting... christos > On Sep 1, 2022, at 3:16 PM, M G P wrote: > > That's understandable, but some make a hell out of nothing, condemning it at all costs. I think it's wrong to take it as plain failure due to the parsing style. > > > > I moved to [T]csh after realizing Bash couldn't avoid injections. I didn't take the time to check on other Bourne-like Shells (and wasn't optimistic on them), but [T]csh proved to be more reliable, though initially I was almost convinced it was a bad idea, due to the heavy criticism. > > > > Wasn't for my curiosity and persistence, I'd believe [T]csh is as bad as some put. > > > > > > > > > From: Christos Zoulas > Sent: Thursday, September 1, 2022, 06:47 > To: M G P > Cc: tcsh at astron.com > Subject: Re: [Tcsh] Compliments to the developers and contributors. > > > There are lots of problems and races in the way csh (and tcsh) evaluates commands and pipelines. Some of them are really hard to fix (see https://bugs.astron.com ). Also parsing is not robust since the shell only recognizes keywords at the beginning of lines in some cases... > > > Best, > > > > christos > > > >> On Aug 31, 2022, at 6:01 PM, M G P > wrote: >> >> >> I wrote a guide on how to use the C Shell, in the hope it'll serve as a guide on how to adequately write scripts, as well as to encourage people on not giving up: https://gist.github.com/Krush206/bfcfd760be645150bb247f051e98c9d3 >> >> >> >> >> >> >> >> From: Tcsh > on behalf of M G P > >> Sent: Tuesday, August 16, 2022 1:20:16 PM >> To: tcsh at astron.com > >> Subject: Re: [Tcsh] Compliments to the developers and contributors. >> >> >> >> >> >> >> https://en.m.wikipedia.org/wiki/Special:MobileDiff/1102822365 >> Why do they think multi-line aliases aren't possible? >> >> >> alias function 'if -e \!$ then\ >> >> echo OK\ >> >> else\ >> >> echo Not OK\ >> >> endif' >> >> function dir >> >> >> >> I can also make it into a variable: >> >> set function = 'if -e \!$ then\ >> >> echo OK\ >> >> else\ >> >> echo Not OK\ >> >> endif\ >> >> :' >> >> eval $function:q dir >> >> >> >> >> >> >> >> From: Tcsh > on behalf of M G P > >> Sent: Monday, January 31, 2022, 05:52 >> To: tcsh at astron.com > >> Subject: Re: [Tcsh] Compliments to the developers and contributors. >> >> >> And I'm very proud to find another, better workaround to the criticism in the Wikipedia webpage: >> >> >> # Always creates an empty file >> >> if (! -e myfile) echo mytext > myfile >> >> # Workaround >> >> if (! -e myfile) eval "echo mytext > myfile" >> >> My workaround : >> >> ( ( : < myfile ) >& /dev/null && echo File exists. ) || ( ( echo mytext > myfile ) >& /dev/null && echo File created. ) || ( echo Cannot create file. ) >> >> >> >> >> >> >> >> >> >> >> From: Tcsh > on behalf of M G P > >> Sent: Wednesday, December 22, 2021, 03:05 >> To: tcsh at astron.com >> Subject: [Tcsh] Compliments to the developers and contributors. >> >> >> Hello. >> >> Just did like to leave a comment in here, thanking the developers and contributors of Tcsh. >> >> >> >> The C Shell is such a brilliant work from Bill Joy, and Tcsh makes a great enhancement and continuation to it. Furthermore, the C Shell is the only Shell out there which resembles the Thompson and Mashey Shells, which (unfortunately) were superseded by the Bourne Shell. >> >> >> >> I'm not a long-time Tcsh user, however, after learning it, it really fascinated me - so much that I keep wondering how some dislike it. >> >> To be fair, Tcsh taught me how to write scripts with security in mind, due its "limitations". The "limitations" imposed by the C Shell make it one of the most reliable Shells to work with, and I should not complain, but thank for that. (E.g: nesting commands is impossible; there are better ways to achieve what one want, without nesting commands.) >> >> >> >> >> I really have no complaints to C Shell or Tcsh, but I must thank each of you who keep the development of an old brilliant gem from Bill Joy and Ken Greer up. >> >> Thank you very much for your time and effort! >> >> >> >> P.S: the complaints from a Perl developer in faqs.org are plain petty; something I learned very quickly is that most things can be worked-around with sub-shells or named FIFOs. >> >> >> >> >> >> >> >> >> >> >> >> >> -- >> Tcsh mailing list >> Tcsh at astron.com >> https://mailman.astron.com/mailman/listinfo/tcsh >> >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 235 bytes Desc: Message signed with OpenPGP URL: From tateusg at hotmail.com Thu Sep 1 12:16:01 2022 From: tateusg at hotmail.com (M G P) Date: Thu, 1 Sep 2022 12:16:01 +0000 Subject: [Tcsh] Compliments to the developers and contributors. In-Reply-To: <461353CC-1FDE-41ED-BEB8-95B6C6848451@zoulas.com> References: <461353CC-1FDE-41ED-BEB8-95B6C6848451@zoulas.com> Message-ID: That's understandable, but some make a hell out of nothing, condemning it at all costs. I think it's wrong to take it as plain failure due to the parsing style. I moved to [T]csh after realizing Bash couldn't avoid injections. I didn't take the time to check on other Bourne-like Shells (and wasn't optimistic on them), but [T]csh proved to be more reliable, though initially I was almost convinced it was a bad idea, due to the heavy criticism. Wasn't for my curiosity and persistence, I'd believe [T]csh is as bad as some put. ________________________________ From: Christos Zoulas Sent: Thursday, September 1, 2022, 06:47 To: M G P Cc: tcsh at astron.com Subject: Re: [Tcsh] Compliments to the developers and contributors. There are lots of problems and races in the way csh (and tcsh) evaluates commands and pipelines. Some of them are really hard to fix (see https://bugs.astron.com). Also parsing is not robust since the shell only recognizes keywords at the beginning of lines in some cases... Best, christos On Aug 31, 2022, at 6:01 PM, M G P > wrote: I wrote a guide on how to use the C Shell, in the hope it'll serve as a guide on how to adequately write scripts, as well as to encourage people on not giving up: https://gist.github.com/Krush206/bfcfd760be645150bb247f051e98c9d3 ________________________________ From: Tcsh > on behalf of M G P > Sent: Tuesday, August 16, 2022 1:20:16 PM To: tcsh at astron.com > Subject: Re: [Tcsh] Compliments to the developers and contributors. https://en.m.wikipedia.org/wiki/Special:MobileDiff/1102822365 Why do they think multi-line aliases aren't possible? alias function 'if -e \!$ then\ echo OK\ else\ echo Not OK\ endif' function dir I can also make it into a variable: set function = 'if -e \!$ then\ echo OK\ else\ echo Not OK\ endif\ :' eval $function:q dir ________________________________ From: Tcsh > on behalf of M G P > Sent: Monday, January 31, 2022, 05:52 To: tcsh at astron.com > Subject: Re: [Tcsh] Compliments to the developers and contributors. And I'm very proud to find another, better workaround to the criticism in the Wikipedia webpage: # Always creates an empty file if (! -e myfile) echo mytext > myfile # Workaround if (! -e myfile) eval "echo mytext > myfile" My workaround: ( ( : < myfile ) >& /dev/null && echo File exists. ) || ( ( echo mytext > myfile ) >& /dev/null && echo File created. ) || ( echo Cannot create file. ) ________________________________ From: Tcsh > on behalf of M G P > Sent: Wednesday, December 22, 2021, 03:05 To: tcsh at astron.com Subject: [Tcsh] Compliments to the developers and contributors. Hello. Just did like to leave a comment in here, thanking the developers and contributors of Tcsh. The C Shell is such a brilliant work from Bill Joy, and Tcsh makes a great enhancement and continuation to it. Furthermore, the C Shell is the only Shell out there which resembles the Thompson and Mashey Shells, which (unfortunately) were superseded by the Bourne Shell. I'm not a long-time Tcsh user, however, after learning it, it really fascinated me - so much that I keep wondering how some dislike it. To be fair, Tcsh taught me how to write scripts with security in mind, due its "limitations". The "limitations" imposed by the C Shell make it one of the most reliable Shells to work with, and I should not complain, but thank for that. (E.g: nesting commands is impossible; there are better ways to achieve what one want, without nesting commands.) I really have no complaints to C Shell or Tcsh, but I must thank each of you who keep the development of an old brilliant gem from Bill Joy and Ken Greer up. Thank you very much for your time and effort! P.S: the complaints from a Perl developer in faqs.org are plain petty; something I learned very quickly is that most things can be worked-around with sub-shells or named FIFOs. -- Tcsh mailing list Tcsh at astron.com https://mailman.astron.com/mailman/listinfo/tcsh -------------- next part -------------- An HTML attachment was scrubbed... URL: From spectre at floodgap.com Thu Sep 1 18:01:07 2022 From: spectre at floodgap.com (Cameron Kaiser) Date: Thu, 1 Sep 2022 11:01:07 -0700 Subject: [Tcsh] Compliments to the developers and contributors. In-Reply-To: References: <461353CC-1FDE-41ED-BEB8-95B6C6848451@zoulas.com> Message-ID: <79bf8a85-f9c7-c438-2e10-68d3c43fff8c@floodgap.com> > It is not bad at all :-) I've been using it for more than 40 years... It is > great for command line use, but not good for scripting... I use it for basic scripts and it works well enough for that. If a script is big enough to require (ba)sh, then it's big enough to require awk or Perl which are faster anyway. Otherwise, tcsh user since the mid-1990s, though I blame the University of California for the "first hit" (csh was the default on BSDI). -- ------------------------------------ personal: http://www.cameronkaiser.com/ -- Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckaiser at floodgap.com -- Great men are not always wise. -- Job 32:9a (KJV) --------------------------