>>19 ksh is the hipster one. And I doubt they'd switch, because being GNUterd is worse than being accused of racism.
zsh is the shell that everyone criticizes in public for being too big (even though it's smaller than bash), but then secretly uses because it's vastly superior.
Name:
Anonymous2012-11-01 18:34
I hate dubs
Name:
Anonymous2012-11-01 18:35
>>21
Is it as idiosyncratic as sh/bash? Is there a shell somewhere that doesn't have ass-backward syntax and extremely limited support for arrays and more complex data structures? I'd like to use scsh, but I'm not sure how good it is.
Is it as idiosyncratic as sh/bash?
Unfortunately, yes. It's syntax is based on Bourne shell syntax.
Is there a shell somewhere that doesn't have ass-backward syntax and extremely limited support for arrays and more complex data structures? https://github.com/frytvm/XS
>>13,21
The nice thing about ksh is that it knows when to stop.
The entire concept of "expansion" is the worst thing about shell languages. bash and zsh address this problem by... adding more types of expansion. That's some wonderful thinking right there.
ksh says, let's keep only the ugly stuff that Bourne compatibility requires us to have, and add new control constructs to so we can use as little of said ugly stuff as possible. It's the only new shell language that has the decency to admit its limitations, and that's why I like it.
>>1 At the FSF, Fox authored GNU Bash, GNU Makeinfo, GNU Info, GNU Finger, and the readline and history libraries.
Somewhere deep inside I always knew all these abominations had to be the handiwork of a single individual.
>>14,23
Stick with AWK and KSH93. You really do not need anything else. And scsh is still beta. There are lots of POSIX stuff still needed to be added. You can help although. And personally, I stick with low level stuff as much as possible, for every byte of redundancy.
This! Rather than using a shitty bloated shell with half-assed programming features tacked on, just use a nice simple programming language that works and a nice simple shell that works.
awk
You guys will like this: some guy wrote a minimal LISP interpretor in awk!
>>35
Someone once implemented a Lisp interpreter in brainfuck.
Name:
Anonymous2012-11-02 11:50
Guys, just use rc like all expert programmers do.
Name:
Anonymous2012-11-02 11:52
The problem is we sometimes have to deal with BASH no matter what.
Name:
Anonymous2012-11-02 13:09
>>37 https://code.google.com/p/zozotez/ ?
Not a very good Lisp interpreter, and not actually written in brainfuck. It's written in something called ``EBF'', and then compiled to brainfuck.
>>38
Or es or xs if you're stuck in the real world.
>>39
The only time I've ever had to deal with bash is stupid GNU configure scripts that have #!/bin/sh at the top and then use obvious bashisms, which break on any operating system that isn't batshit insane.
Name:
Anonymous2012-11-02 13:17
>>40 xs
The syntax is irregular, and getting used to bash's retardedness already wasted too much of my time. I want a Lisp with constructs that help doing shell scripting stuff. Something like scsh but that isn't shit. I suppose I could write my own in over 9000 hours in Scheme inb4 back to /b/, >mfw I've been here since 2006, but I have better things to do.
>>39
Were in Earth have you worked? There's at the least awk and dash on most systems that has bash. I dunno one thing that you cannot do in awk and ksh93 for server scripting that bash is \\requiredǁ.
And like I said, personally I use low level stuff when I can. Make my own daemons and mini binary DBs. Do near tcp.h configurations, and get done with it.
>>50
Please don't call me ``anon''. It's very debilitating.
Though your link was to the wrong place (It's insanely clear that I meant .shrc and friends I'm not even joking), I now know the answer, and I thank you from the bottom of my anus.
Name:
Anonymous2012-11-03 10:53
fucking cunts. why can't they name it something meaningful? rc? what in the fucking goddam cunt is r motherfucking c?
It is better to have consistent semantics than semantics that bend in various directions for special circumstances, because no one will be able to remember the exceptions for every circumstance. If you can't handle this concept, then maybe you should not attempt to use a shell, and stick to using guis and flipping burgers. I think that is more cut out for you.
>>59
Richie and Thompson don't have anything to do with sudo. Coggeshall and Spencer wrote it, and the fact that its semantics don't mesh perfectly with the command line's is their fault.
It has exactly nothing to do with Unix; neither POSIX nor SUS mention it. That's like blaming Unix for emacs.
>>65
sudo is a command and behaves as such. Now go scrub another mental burger you toilet fryer.
Name:
Anonymous2012-11-03 14:53
>>33 KSH93 ─> ksh
$ variable="HAX MY ANUS"
$ echo $variable
HAX MY ANUS
$ exit
I fucking hate this ``feature''.
Name:
Anonymous2012-11-03 16:13
>>65
Are you stupid?
Semantics of a > b: Run command a and save its output to file b
Semantics of sudo printf "foo" >/etc/file: Run command sudo printf "foo" and save its output to file /etc/file
Sounds about as inconsistent as a tautology.
It's a byproduct of the shell tokenising input for you.
The alternative is for each command to do its own tokenisation, but then you'd have all sorts of bullshit like needing to escape different sets of charactors for cp and rm.
It's a byproduct of the shell tokenising input for you.
The alternative is for each command to do its own tokenisation, but then you'd have all sorts of bullshit like needing to escape different sets of charactors for cp and rm.
One thing I don't get, though, is why you sometimes have to «>/dev/null 2>&1», instead of a straight «&>/dev/null»…
Name:
Anonymous2012-11-05 14:13
>>67,70-72,76 echo $variable
$variable is expanded, then its expansion is passed to echo. echo then sees three arguments HAX, MY, and ANUS, and then outputs them sequentially, with a space in between, because that's what it does.
Name:
Anonymous2012-11-05 14:18
Bash a nigger in my jewnicks. you feeling me?
Name:
Anonymous2012-11-05 14:24
Anyone who tries to take my general purpose computer or my photolithography equipment will meet the nasty end of my shotgun.
I FUCKING HATE YOU DIE IN A FIRE CRETIN.
Name:
Anonymous2012-11-05 14:26
>>80
That's me, but I'm truly going to shut up and I suggest everyone else does too because there is one hell of a Erlang programmer being the blackest black a nigger could ever be. His truly black and nigger and the best programmer I know.
Name:
Anonymous2012-11-05 20:41
>>78 > is really 1> (stdout), 2>&1 redirects fd 2 (stderr) into fd 1's stream. So if the program produces any output on stderr you need to redirect that as well, and this is how.
It's not important whether you redirect them separately to /dev/null, but if you want to capture both streams as one (into a file, say), you have to do it that way... and in that order last I checked.
Name:
Anonymous2012-11-06 5:20
>>83
Problem is, "&>" was supposed to do that in one single operation, as opposed to having to split them into two (">/dev/null" and "2>&1"). It's why that doesn't always work, that I don't get.
Name:
Anonymous2012-11-06 5:44
this thread is so full of simultaneous fail and insight, just like bash!
Name:
Anonymous2012-11-06 6:13
it was mentioned before in this thread, but it's still a fact that sort of eludes me. the parsing of " versus '. the programmatic escaping of quotes? these are things which bug me the most, especially when loops break lines on spaces. fucking bullshit.
>>91
Literally everyone on /prog/ has at least one half-finished textboard or imageboard implementation somewhere on his hard drive.
Just look through people's Github accounts. There's dozens.
>>93
Suitably self-absorbed riders with githubs should agree on a common signature to place in an agreed-upon place on their github profiles or projects.