597 points · by axiomdata316 · 7y ago · 169 comments
Skimming The Grapes of Wrath would be shorter. Thank you, but no thank you.
https://www.tldp.org/LDP/abs/html/
(as a pdf: http://tldp.org/LDP/abs/abs-guide.pdf )
>fileLet me help you with this:
man -t bash > man.ps && lpr man.ps
Then, grab a coffee, sit in the sun and spent some quality time with your tools. :)It happened to me often enough that even when I knew what I wanted to achieve and which command X could do that I would first try to read darned man page and fail to find the solution, but then just googling gave enough of material to
a) have something to try
b) have a discussion of the cases where that "something" doesn't fulfill the use most use cases of those who asked (the "natural need") including, of course, the use case I've had.
I have a completely opposite attitude. Bash is horrible on many levels. Bash man page is only a part of horribleness.
The main problem for all man pages is that they are mostly as if written for those who already know about every unnecessary detail of both the tool in question and all related tools or environmental issues, but who searches for some even more obscure detail among all obscure details that they already know.
Not to mention the descriptions that aren't: e.g. the complete explanation of the option --frob-blonk FILE would be something like "this option uses the FILE as the frob blonk" oh, how helpful.
I use bash every day, but I've at least managed to reduce its use to the minimum that keeps me still sane.
When you don't know what to look for, it is not as simple as "looking something up".
There are too many developers who rely only on Google/Stack Overflow to find and write answers to questions, and it's common to repeat bad, incomplete, or outdated information. I can think of a lot of times when the most accepted SO answer for many questions was "copy and paste this gigantic block of code" instead of using an existing command.
I'm happy to read more expansive pages in my own time but when I'm 'in the zone' as it were, the last thing I want to do is read through why something works. Perhaps it's a gap in the market? Or more likely I'm in the minority!
lpr <(man -t bash)
See: https://unix.stackexchange.com/a/64011 function pman() {
man -t ${1} | open -f -a /Applications/Preview.app
}It's actually 78 pages on my system (Debian, bash 4.4.12).
I've heard that OpenBSD has the best man pages that are more pleasant to read and more informative/concise.
IME it’s easier to focus when reading printed documentation. One can jot down notes and no temptation to go and reload Facebook/Twitter/etc. I haven’t done it often, but some commands are really worth knowing inside and out.
man --html=calibre bash sudo apt install -y bash-doc && lpr /usr/share/doc/bash-doc/bashref.pdf
178 pages of awesome.m, a Unix shell utility to save cleaned-up man pages as text:
https://jugad2.blogspot.com/2017/03/m-unix-shell-utility-to-...
Edit: Also check out the stuff about the word mu in the latter part of the post :)
:r !man bash | col -b
the col utility will strip backspace characters with the -b switch (along with reverse line feeds).Learning the fundamentals of your tools is a...fundamental of doing this job. If you don't want to know how your tools work, I question one's competence or desire to do this job.
> If you don't want to know how your tools work, I question one's competence or desire to do this job.
I in turn question one's competence when, instead of getting the job done, hours upon hours are spent on irrelevant parts of configuration or getting some ideal solution to work where something less elegant would perfectly suffice. Unfortunately, the folks insisting on 'mastering' ones tools tend to often be in that category.
As an analogy: I don't care if the craftsmen that fixes my house uses his hammer holding it upside down. I only care that my house is properly fixed and stays so. How that was achieved, I could not care less about.
If one doesn't care that the carpenter building his house is using a hammer upside down, that's a whole 'nother bunch of issues I won't go into here.
~240 pages for man bash
Google says the grapes of wrath has 464 pages.
I call that a similar ballpark. If I had an English exam with Steinbeck as one of the set texts just once I would read every word of it. I have a shell exam every damn day I work rest and play. Do you? Is skimming seeming more reasonable in that light?
Huh?! Unlikely?!
Not one in my team use an IDE because they die merely trying to index everything. Everyone uses a simple editor of choice: Emacs, Vim, VS Code and Notepad++ are the popular choices. Everyone has at least two Bash/CMD instances open.
The systems programming world is a different one unlike the web programming world where everything is small and self contained for an IDE and GUI.
Vim with cscope/ctags is the best of both worlds. Index your project once -- no penalty when building. Symbolic searching is a must have on any large code base (declaration, usage, etc).
That being said, my most used is probably either regular Notepad or Notepad++ in a Windows env.
(I've got 10+ years of experience in software development and I just can't get to grips with it, at best I can do basic operations in Vim (for git). Looked at emacs the other day but I need to read a lot of manuals and tutorials and practice to get to grips with it)
I'm currently using VS Code, before that it's been IDEA, Atom for a little while (but it was slow), Sublime Text (I still miss it), and much longer ago, notepad++ and eclipse. (the folder I have all my code in is still called "workspace").
Yes, well, see what happens? Every time fads change or new languages appear, you have to change your editors. What if you could have just one editor for everything? For text files and taking notes, for all the programming languages in the world that you just learn once and learn it well, and be done with it. No more need for new editors.
It was the built-in tutorial that got me started. One just needs to type C-h t and then you’re good! Each to their own but that has suited me well at least.
My recommendation: Go with spacemacs. It is perfect for people who just want to use the goodness of emacs without it weird edges and spending hours on configuration. One day I might switch to emacs, but for the coming time I am perfectly happy with using a pre-configured emacs. The time I don't spent working, I'd rather read more papers and do non-compsci-stuff.
they're very rare but do exist.
An editor like Vim or Emacs ia great because eventually
_the editor adapts itself to the programmer and not the other way around_.
Every other configuration of Emacs and Vim have been different, suiting the programmer writing it. People have distros of Emacs/Vim
- Doom - Spacemacs - NeoVim
Etc.
I agree. nonetheless, most developers use IDEs. This in turn means that a developer is unlikely to use only simple editors.
Maybe actually read the comment chain you're responding to?
1: https://insights.stackoverflow.com/survey/2018#technology-_-...
VSCode, Visual Studio, Intellij may be fighting for mindshare on laptops, but if you ssh into a server, I bet you're using vim.
I mean, sometimes I run vim in the integrated terminal in VSCode. :) Whatever is quicker/handy. I know I answered that question with "VSCode, Sublime, Emacs, and Vim".
By any other meaning, emacs and vim wouldn't qualify.
But that is entirely besides the point. The parent was outraged how developers are unlikely to use only simple text editors. And the phrase he was taking an issues with didn't say that emacs is a simple editor either. So you're either willingly misinterpreting everything or just unable to read and understand simple sentences.
Does your lab work well with 2-3 people being able to set up the data processing for the rest of the team?
Learning the unix commandline is considerable effort and requires regular practice. Instead of learning bash, biologists could spend their time reading relevant papers in their specialization or brush up on statistics.
Those people who know their stuff aren't doing that job because they have their own data to deal with. There are people with 10,000 line proteomics outputs who manually search for missing entries. There is at least one student with single cell RNAseq data which she can't even look at (never heard of fastqc or the LESS command). It is frankly disasterous.
I figured maybe other fields have the issue too and I got it together enough to out out my first and only ebook on the topic. It's higher level than OP here, but still focuses mostly on the command line. Anyway, it's called Digital Superpowers and is $10. If anyone wants a preview chapter or anything I can send you one.
As an example: https://bedtools.readthedocs.io/en/latest/
But there are also many people who use Common Workflow Language (https://www.commonwl.org/) for this purpose.
CWL allows for workflow portability between execution engines. The open source engine my team creates (Arvados - https://arvados.org) is ideal for large-scale processing work.
We store, process and manage petabytes of genome data with it, and execute workflows that span hundreds of simultaneous compute nodes.
Search for eternal bash history and set it up once. I can point out its usefulness more.
It's worth doing, purely for the enlightenment of freeing you from the busted, "macho" notion that a GUI is inferior to a command line. GUIs are awesome.
(I actually made a proof-of-concept tool called 0rk which displays the images in the terminal https://github.com/follower/0rk so you don't even have to leave your terminal to look something up.)
There's also the TLDR pages project which aims to create "Simplified and community-driven man pages" with practical examples which looks like a helpful approach: https://tldr.sh/
Not sure if any of the TLDR clients already do this but it just occurred to me it'd be cool to be able to view an example and then edit it directly...
https://news.ycombinator.com/item?id=9720813
(Provided for interest purposes, not suggesting it's a dupe - https://news.ycombinator.com/newsfaq.html)
https://developer.ibm.com/articles/au-unixtext/
After years of using bits of bash I've found quite a few new things for me.
https://pubs.opengroup.org/onlinepubs/007904875/utilities/xc...
For whatever reason, programmers tend to be rather dismissive of non-general-purpose programming languages, or more generally languages that do not work like conventional general-purpose languages, and refuse to learn them. I think the worst case we see of this is with CSS, where people come up with elaborate ways to place boxes procedurally in javascript (and JS once suffered from being considered a toy language, too), but I've seen similar attitudes get pointed at things like apache configuration, systemd unit files, jq, and Lua.
(On the other end, sometimes people believe that they're just writing configuration, and that this is somehow more maintainable than writing code, when really they're writing code embedded in a data description language; see Chef, Ansible &c.)
As for autotools, autoconf's "Portable Shell Programming" document covers seriously ancient shells. New programs following those guidelines aren't trying to stay compatible: their code isn't going to compile on the relics that run those shells without active effort that generally isn't happening. It's just a cargo cult.
Also, would suggest mentioning gitbash in the Windows section. You get it for free with git so it's easy to come by, even in corporate environments where obtaining permission to install software is hard. If combined with something like ConEmu, it's actually pretty nice.
I find the choice of the word "obscure" a bit amusing, given that this section lists many commands used ona daily basis by thousands of syadmins.
Never again!
Use xonch at least.
Yep, learned that the hard way
If you're just picking it up, check it out.
It's less likely you'll "master" a terminal emulator. (Other than figuring out settings where the defaults get in your way of using it).
Most of it works just the same.