8 ms·
And yet, the top search result is tldp. This is what #bash on freenode has to say about that site: > The infamous "Advanced" Bash Scripting Guide should be av
by chx 12y ago
And yet, the top search result is tldp. This is what #bash on freenode has to say about that site:
> The infamous "Advanced" Bash Scripting Guide should be avoided unless you know how to filter out the junk. It will teach you to write bugs, not scripts. In that light, the BashGuide was written: http://mywiki.wooledge.org/BashGuide http://mywiki.wooledge.org/BashGuide
Now, that site is on the second "page" of the search results.
- zhemao 12y agoTo be fair, searching it in Google also gives TLDP pages as the top results. I think TLDP just has better SEO.
- n0rm 12y agoIt just has more nodes pointing to its links. That's the danger behind PageRank. If something false is popular enough, it will replace fact.
- pavs 12y agoNot just more nodes, then it would have been easy, but more "credible and relevant" nodes. At least that's the idea.
- Alupis 12y agocorrect. simple back-links no longer have the weight they used to (and in some situations can actually harm your SEO). Backlinks must come from other reputable (in google's algorithm's eye's) sites before they carry any weight. So, this would mean, tldp.org has a lot of top-ranked linux/bash and related sites pointing to it's pages.
- PhasmaFelis 12y agoIs there any alternative, though? You can't algorithmically determine truth.
- r00fus 12y agoNot without sentiment analysis applied to links. However, that's game-able.
- fyrabanks 12y agoI learned bash using tldp years ago, never had any major issues.
- mhurron 12y agoDo they have examples of how it's bad as opposed to simply declaring it bad?
- js2 12y agoWell for example, I just skimmed through it and I don't see an explanation of quoting, probably one of the first things I would want to explain, around the time variables are explained. It also has examples like this: #!/bin/bash for i in $( ls ); do echo item: $i done which both uselessly calls ls (you may as well just use a glob) and doesn't work as intended if there are filenames with spaces in the directory. You also have: #!/bin/bash for i in `seq 1 10`; do echo $i done Why is it using backticks here instead of $() as in thr former example? Also, no mention that seq is not available on some systems. And, you should be using bash's sequence expression[1] anyway (added in bash 4.x), so the guide is likely out of date. 1. http://www.gnu.org/software/bash/manual/bashref.html#Brace-Expansion http://www.gnu.org/software/bash/manual/bashref.html#Brace-E...
- chalst 12y agoI use some systems without seq, and they have Bash with version 2.x or 3.x on them (eg., OSX). seq has the nice property that writing a shell or executable replacement is easy. I think the 2nd example is fine. It might be cut and pasted from a POSIX example.
- js2 12y agoThose are fair points. Another nit I just noticed in the second example is the extraneous semicolon.
- dspillett 12y agoUsing ls instead of a glob can be valid if you need to force ordering for some reason (you want to process things in date order for instance, IIRC the order out of a glob wildcard is alphanumeric in most places and arbitrary in some). Your point about spaces in filenames is definitely valid though but my preferred solution to that would be to stab people with a needle every time they put a space in a filename!