Dude! I don't know how to script in [t]csh. I once tried many years ago. I thought, 'Well, it's C-like, and if it's my shell, then let's also learn scripting in it.' I don't know how long it took me to gave up, and perhaps there could be some others maybe tell you otherwise, but to me scripting in [t]csh was a massive pain in the a...! Maybe I missed a point, or two, but my recommendation was: Waste of time to even try it! Don't script in [t]csh!but I can't script in it. If I have to script something on one of those I'd just use sh. (Or ask Maturin for help)
Same but it's still not perfect. Regularly trying to solve an error happening at the "last line", having errors based on context but not syntaxis, loops forgetting exit variables, here-documents not accepting code structure indentation, like C preprocessor lines, getting warped when a script line count is changed during runtime...bash. I want a base line I can use across most platforms without much fuss.
if ( -X zsh && -f ~/.Use_zsh ) exec zsh
that used to be me up until i started learning scripting by myself, the shell i used quite mattered because of it so i ended up growing attached to oneWhatever shell is set for the user I'm currently working as on whatever machine I'm currently working on. For FreeBSD that means sh and csh, for Debian it is mostly bash. And so on.
I'm not very tied into whatever shell I use; I configure it so it has the aliases I'm used to, and a reasonable amount of command history. That's it.
I want a base line I can use across most platforms without much fuss.
I'm not even sure if today I would recommend (t)csh anymore.
ba for #!/bin/sh to FreeBSD)this is probably available even in zsh's website, there also are some shell options you may also enable for even more compatibility with bashI thought I'd heard that zsh is compatible with bash, that is it will work with most bash scripts. I thought that was part of its attraction, that it works with both bash-isms, and csh-isms. Of course, don't remember where I'd read this.
i kinda doubt a shell would change this drastically, i'd think an interpreter being compatible with old code is like a priority so that shit doesn't breakBut for what it's worth, testing with zsh at one point, when I was just trying it, did work with some basic sh and csh stuff. This was longgg ago, though might have changed for all I know.
it's supposed to be like that, which also makes it the slowest shell of them all, which i absolutely hateI think some, perhaps a few, Linux distributions I played with also had fish, which I found rather annoying, predicting what I was going to type (often the wrong thing if I typoed) and, if I'm remembering right, colored text.
yeah that one has to have the most HIDEOUS syntax of them all, i dunno what microsoft thought that making commands huge as fuck would be any goodI use CMD on Windows (not a fan of PowerShell syntax)