[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Shell scripting in anything but Bash
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 17
Thread images: 2
File: fish hell.jpg (47 KB, 644x250) Image search: [Google]
fish hell.jpg
47 KB, 644x250
So, other Shells exist. Take the wonderous zsh, or the cozy fish-shell as examples.

Does anyone actually do shell scripting in any shell that isn't either a dialect of the standard Unix shell or Bash? I can't say I've ever seen anyone ever write or use a zsh or fish-shell script before, much less use it for anything but personal use.

Does anyone do scripting in alternative shells?
>>
Nobody uses these outside of a few fringe circles, and certainly nobody tries to release scripts for non-bash shells.
>>
>>54968964
Powershell. To be honest, it's really good.
>>
>>54969060
Those were my thoughts as well.

I wonder why the developers even bother putting effort into their shell's scripting capabilities if nobody's going to even end-up using it. Is it because writing a language is butt-easy easy these days? And is that why every hipster I know mentions the word "lexer and token analyzer" at least once per day?
>>
>>54969071
Well, that's a little different Anon, since that is a Windows tech (don't tell me about PowerShell DSC for Linux... shit ain't practical). And PowerShell itself is kind of a replcement for Microsoft's replacement for the shitty, creaky Batch/cmd scripting.

But yes, PowerShell is very nice. I script in it myself on Windows, and it's a damn pleasure to work with because of Microsoft's different take on what a shell should be (e.g., OOP-oriented pipeline, seamless remoting, etc.).

I think I'll just conclude that literally nobody scripts in fish-shell, and the people who use Zsh for general-purpose scripting are the same people who waste their time ricing the shit out of their colorful, daemon-based terminal/vim status bars.
>>
>>54969093
Writing a language and interpreter is one of those bucket-list programming challenges that every beginner tries to do regardless of programming skill.
What I don't understand is why they purposefully ignore posix standards and render their shell incompatible with anyone else's.

Also notice that the vast majority of zsh/fish users are webdev mac hipsters.
>>
File: Plan9bunnysmblack-1.jpg (7 KB, 190x222) Image search: [Google]
Plan9bunnysmblack-1.jpg
7 KB, 190x222
The plan 9 shell rc is actually very good for scripting, very clean and regular syntax, and very flexible. It's not very good as a command shell, since the plan 9 environment had other ways of doing command history and completion etc so they're missing in rc. But for scripting its really very nice.
>>
>>54969159
I would kill for actual Powershell on *nix.
>>
>>54969168

>Also notice that the vast majority of zsh/fish users are webdev mac hipsters.

I've been coming to that same conclusion as time prgoresses. And it feels like those people spend more time ricing the shit out of their setup than actually doing any kind of work. I wouldn't even know how they'd deal with the nightmare of making their setups portable when they need to do something on another machine.

And as for Zsh, it's definitely a nice shell and I love some of its features (Path Replacement anywhere-alias, RPROMPT), but some of stuff you can do in it seems so out-of-scope for what a shell should do. Like this for example:

http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fnet_002ftcp-Module
>>
I use zsh, and generally I use it as an ehanced bash.
>>
>>54968964

no, use sh (bourne shell) or bash. why? cos they're solid.

the reason no professional uses zsh to write scripts in is cos its a csh derivative (CSH_JUNKIE_LOOPS anyone?).

and if you dont know why no one codes in csh derivatives, go google tom christiansen, his article "csh prgramming considered harmful" should clue you in.
>>
>>54970093
Zsh isn't a derivative of csh, it actually more like ksh with some features from csh.
>>
I mostly do scripts in ksh or ash, which are both sh, but I've done scripting in csh too.
>>
>>54970398
Well, it all depends on the distro/OS. /bin/sh on...

Debian = dash
Fedora = bash
FreeBSD = ash
NetBSD = ash
OpenBSD = ksh

I don't even know why I just wrote this. I'm going to bed now. Was nice chatting everyone.
>>
>>54970334

well i dont agree, ksh is bourne lineage.
zsh is csh, cos, of all the CSH_JUNKIE_* stuff, and cos cp blah !#:1_old works.
but whatever, dont write production scripts in zsh.
>>
Plebs not writing production scripts in zoidberg

https://github.com/jberger/Zoidberg
>>
>>54970495
lol what
areyoudumb?
Thread replies: 17
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.