|
ksh was legit cool and good before bash became a thing it supported arrow keys and yes that was nifty at the time
|
![]() |
|
![]()
|
# ? Jun 10, 2024 20:07 |
|
doritos locos nacho flavor
|
![]() |
|
Shaggar posted:doritos locos nacho flavor https://www.youtube.com/watch?v=_sSVqaSl89A
|
![]() |
|
I tried one of those once, the shell was very fragile
|
![]() |
|
There Will Be Penalty posted:ksh was legit cool and good before bash became a thing ksh is still better than bash. the vi/emacs modes in ksh are much more sophisticated than gnu readline, which is what bash use. the scripting is at least modestly less broken. the reason that the world standardized on bash was purely licensing. bash was almost as good, but the gpl beat the pants off having to pay at&t money, and ksh93 wasn't open sourced until it was way too late. i'm pretty ok with that. don't let the perfect be the enemy of the good etc etc that said, now that ksh93 is freely available there's no reason not to use it interactively in preference to bash
|
![]() |
|
Silver Alicorn posted:I tried one of those once, the shell was very fragile dsyp
|
![]() |
|
just never write a bash script and i'm fine with bash. the fact that people (which, unfortunately includes me at times) open a file to script a task, blank for a moment, then go #!/bin/sh, and then invariably write a surprisingly compact representation of a broad selection of standard errors and security issues, is enough reason to actually dislike bash oh, but add the bindings bind '"\e[A": history-search-backward' bind '"\e[B": history-search-forward' should have been the default
|
![]() |
|
bash scripting is fun and powerful
|
![]() |
|
OldAlias posted:bash scripting is fun fun is super subjective
|
![]() |
|
Notorious b.s.d. posted:the scripting is at least modestly less broken. can you provide more details on why that's the case? i've actually done a shitload of bash scripting
|
![]() |
|
Notorious b.s.d. posted:ksh is still better than bash. the vi/emacs modes in ksh are much more sophisticated than gnu readline, which is what bash use. the scripting is at least modestly less broken. ksh is good, openbsd still uses a proper port of it and it's the standard shell on most commercial unix. set -o vi, maybe a profile and it's nice
|
![]() |
|
There Will Be Penalty posted:can you provide more details on why that's the case?
ksh is a lot closer to perl or python, feature-wise it still lacks a debugger, though. in a world where perl and python exist, you would have to be a complete loving idiot to choose ksh over a real scripting language. There Will Be Penalty posted:i've actually done a shitload of bash scripting you poor bastard i have not done any significant work on shell scripts since 2010 and if i have it my way, i never will, ever again, ever holy poo poo is shell scripting terrible unironically the worst idea ever integrated into an operating system
|
![]() |
|
Notorious b.s.d. posted:holy poo poo is shell scripting terrible look at this wronghaver shell scripts can deffo be a little messy, but they're quick and easy and make automating stuff simple a 10-line shell script can easily do the work of a 100-line python script, and will work on the shittiest embeddedest linux u got
|
![]() |
|
Poopernickel posted:look at this wronghaver my rule for shell scripts is that if you ever nest a control structure, it is already past time to port to a real scripting language. ten lines will often already be over the top. as for lovely embedded linux, if you can deal with the massive amount of forking and cpu/memory waste implied by shell, you can also deal with perl. lastly, with respect to brevity, if python is too wordy, use perl or ruby. typically one can port a shell script to perl line for line! and perl has a real debugger. i don't really care what scripting language you use. friends don't let friends write shell.
|
![]() |
|
some tooling i maintain consists of a wizard that fills out templates of jcl jobs which call into various parts of a 2000 line shell script that scrapes config files and then calls more shell scripts to kick off the actual tooling itself, which is in java hail shell satan
|
![]() |
|
carry on then posted:some tooling i maintain consists of a wizard that fills out templates of jcl jobs which call into various parts of a 2000 line shell script that scrapes config files and then calls more shell scripts to kick off the actual tooling itself, which is in java scala makes a really really good scripting language and can be invoked with a shebang, just like shell. (you set the classpath and JAVA_HOME and so on in a "shell preamble" at the top of the file, which is ignored by the scala interpreter) then you can call into the java tooling directly, using its native api
|
![]() |
|
Notorious b.s.d. posted:
bash does have associative arrays now quote:
that's neat. but *most* of the time when you're writing lovely glue language garbage like most shell scripting is, the output of a function is good enough to use as a "return value" in most situaitons i guess. but yeah, there are most definitely times when i use perl. quote:you poor bastard ![]()
|
![]() |
|
Notorious b.s.d. posted:using its native api lol doesn't have one, unless you wanna count invoking main()
|
![]() |
|
Cybernetic Vermin posted:just never write a bash script Notorious b.s.d. posted:
quote:ksh is a lot closer to perl or python, feature-wise ![]()
|
![]() |
|
http://blog.fpmurphy.com/2010/05/ksh93-using-types-to-create-object-orientated-scripts.html#sthash.snlyNUcl.dpbs dear mother of god
|
![]() |
|
There Will Be Penalty posted:http://blog.fpmurphy.com/2010/05/ksh93-using-types-to-create-object-orientated-scripts.html#sthash.snlyNUcl.dpbs what in .tarnation
|
![]() |
|
i didnt know the term "shell" when i was a child so i thought this program was dos 's hell
|
![]() |
|
bash especially bash4 is cool and good op add in mawk and vim embedded awk highlighting and you got yourselves some good hi-po fuckkn scripting
|
![]() |
|
There Will Be Penalty posted:http://blog.fpmurphy.com/2010/05/ksh93-using-types-to-create-object-orientated-scripts.html#sthash.snlyNUcl.dpbs ![]()
|
![]() |
|
although making each object a directory with inheritance via symlinks would be a more unixy approach imo
Gazpacho fucked around with this message at 04:36 on Aug 5, 2017 |
![]() |
|
just don't fucken ask me why they're called "discipline functions" or how name spaces work. i tried to find examples of the latter but it's all poo poo on stackoverflow that doesn't explain poo poo
|
![]() |
|
Gazpacho posted:although making each object a directory with inheritance via symlinks would be a more unixy approach imo to illustrate, here's a script that creates a board game object and invokes a method on it to initialize its board. (may contain bugs!) Bash code:
Gazpacho fucked around with this message at 09:00 on Aug 5, 2017 |
![]() |
|
I like conch shells
|
![]() |
|
it's spelled xonsh, m8
|
![]() |
|
Breakfast All Day posted:its taco, op
|
![]() |
|
Perl: not even once
|
![]() |
|
personally i use duckduckgo
|
![]() |
|
bira bira bira zsh zsh zsh e: also ![]() Dan Quayle Treasure Trail fucked around with this message at 00:19 on Aug 6, 2017 |
![]() |
|
There Will Be Penalty posted:http://blog.fpmurphy.com/2010/05/ksh93-using-types-to-create-object-orientated-scripts.html#sthash.snlyNUcl.dpbs if you really want to suffer, go dig up some dtksh examples it's a complete motif + dttoolkit binding for ksh and it is frightening
|
![]() |
|
Notorious b.s.d. posted:if you really want to suffer, go dig up some dtksh examples i posted about dtksh on page 2 gui's are also when i whip out #!/usr/bin/env perl with tk or something
|
![]() |
|
why dont more people use tcl
|
![]() |
|
pram posted:why dont more people use tcl tcl is/was really big in telecom 10+ years ago
|
![]() |
|
pram posted:why dont more people use tcl
|
![]() |
|
pram posted:why dont more people use tcl tcl is better than shell
|
![]() |
|
![]()
|
# ? Jun 10, 2024 20:07 |
|
![]()
|
![]() |