Suggestions: A Book for a Beginner, new to the Linux Shell
A discussion came up in the Toronto Raspberry Pi Meetup* about suggestions for learning to work in bash. We didn't come up with anything much, but if you have any suggestions, I'd be grateful to hear them. cheers, Stewart *: We had a demo of a Thing That Made Really Big Sparks, plus How Not To Cool a Raspberry Pi 3. It was fun.
I like "The Linux Command Line" by William Shotts: http://linuxcommand.org/tlcl.php Available under a Creative Commons license for download and hard-copy for purchase. On Sun, Jul 17, 2016 at 8:21 AM, Stewart C. Russell via talk < talk@gtalug.org> wrote:
A discussion came up in the Toronto Raspberry Pi Meetup* about suggestions for learning to work in bash. We didn't come up with anything much, but if you have any suggestions, I'd be grateful to hear them.
cheers, Stewart
*: We had a demo of a Thing That Made Really Big Sparks, plus How Not To Cool a Raspberry Pi 3. It was fun.
--- Talk Mailing List talk@gtalug.org https://gtalug.org/mailman/listinfo/talk
-- (o< .: Per curiositas ad astra .: http://www.circuidipity.com (/)_
I learned the command line from a charming and very readable book: 'Starting with Unix' by P.J.Brown. It appears on Amazon for the princely sum of $1.05, and probably available used through ABE (Academic Book Exchange) or other used book dealers. Who would have thought that a book on the Unix command line could be an entertaining read? But it is. It's not hugely comprehensive, but it's great as a starting point. Peter
I like "The Linux Command Line" by William Shotts:
http://linuxcommand.org/tlcl.php
Available under a Creative Commons license for download and hard-copy for purchase.
On Sun, Jul 17, 2016 at 8:21 AM, Stewart C. Russell via talk < talk@gtalug.org> wrote:
A discussion came up in the Toronto Raspberry Pi Meetup* about suggestions for learning to work in bash. We didn't come up with anything much, but if you have any suggestions, I'd be grateful to hear them.
cheers, Stewart
*: We had a demo of a Thing That Made Really Big Sparks, plus How Not To Cool a Raspberry Pi 3. It was fun.
--- Talk Mailing List talk@gtalug.org https://gtalug.org/mailman/listinfo/talk
-- (o< .: Per curiositas ad astra .: http://www.circuidipity.com (/)_ --- Talk Mailing List talk@gtalug.org https://gtalug.org/mailman/listinfo/talk
-- Peter Hiscocks Syscomp Electronic Design Limited, Toronto http://www.syscompdesign.com USB Oscilloscope and Waveform Generator 647-839-0325
| From: Peter Hiscocks via talk <talk@gtalug.org> | I learned the command line from a charming and very readable book: | 'Starting with Unix' by P.J.Brown. Interesting that you liked his writing. Many years ago (in the 1970s) I read the manual he produced for ML/1, his macroprocessor. I was startled at how well the manual worked, at least for me, at least at that time. Perhaps the best manual I have read. Apparently ML/1 was the result of his PhD research, completed in 1967. Computers back then were a quite different beasts. Still, I might consider using ML/1 now. Much more comfortable than M4. Most of the links here seem to be broken: <http://empslocal.ex.ac.uk/people/staff/pjbrown/public_html/ml1/> This seems OK: <http://www.ml1.org.uk/> I noticed that they have a PDP-8 implementation. I thought that ML/1 into 4K words (of 12 bits) would be impossible. Turns out that they used two "fields" originally, and then three. So 8K and then 12K words. Still remarkable. The implementation of ML/1 is quite interesting. It was made to be portable and self-compiling. This is before C and UNIX. <http://www.ml1.org.uk/implementation.html>
Many years ago (in the 1970s) I read the manual he produced for ML/1, his macroprocessor. I was startled at how well the manual worked, at least for me, at least at that time. Perhaps the best manual I have read.
Apparently ML/1 was the result of his PhD research, completed in 1967. Computers back then were a quite different beasts. Still, I might consider using ML/1 now. Much more comfortable than M4. Most of the links here seem to be broken: <http://empslocal.ex.ac.uk/people/staff/pjbrown/public_html/ml1/> This seems OK: <http://www.ml1.org.uk/>
I noticed that they have a PDP-8 implementation. I thought that ML/1 into 4K words (of 12 bits) would be impossible. Turns out that they used two "fields" originally, and then three. So 8K and then 12K words. Still remarkable.
The implementation of ML/1 is quite interesting. It was made to be portable and self-compiling. This is before C and UNIX. <http://www.ml1.org.uk/implementation.html>
That is interesting.I notice that he also has a book on 'Interactive Compilers', so maybe that is related. He does write very well. Peter
Thanks, all. I'll definitely take a look at "The Linux Command Line" by William Shotts, as recommended by Daniel. While manpages or info pages might tell you how to use a command, they won't explain what they can do. Also, this particular learner is a dedicated book learner (and librarian). While info might have a few useful features, my main gripe with it is that to process an info page, you need to pull in texinfo. This in turn pulls in TeX Live as a dependency. TeX Live is a multi-gigabyte package. man (mostly*) only needs [gnt]roff, and that's tiny by comparison. cheers, Stewart *: (Yes, there's a UTF-8, LTR and [possibly] bidi-aware version of troff: http://repo.or.cz/neatroff.git)
On 16-07-18 12:18 PM, Stewart C. Russell via talk wrote:
While info might have a few useful features, my main gripe with it is that to process an info page, you need to pull in texinfo. This in turn pulls in TeX Live as a dependency. TeX Live is a multi-gigabyte package. man (mostly*) only needs [gnt]roff, and that's tiny by comparison.
I know disk space is considered cheap but I object on principle to pulling in massive amounts of files as dependencies to do a simple job, or one that I only need to do on a limited basis. Sometimes the dependencies pulls in a lot of stuff I have no plans to ever use. It has been a while since I used info. In the past I found it wasn't easy to figure out which keys I needed to hit to navigate the menus and access the information I wanted. With a man page I can do a quick search using a command line key I use in vi. -- Cheers! Kevin. http://www.ve3syb.ca/ |"Nerds make the shiny things that distract Owner of Elecraft K2 #2172 | the mouth-breathers, and that's why we're | powerful!" #include <disclaimer/favourite> | --Chris Hardwick
On Mon 18 Jul 2016 12:18 -0400, Stewart C. Russell via talk wrote:
While info might have a few useful features, my main gripe with it is that to process an info page, you need to pull in texinfo. This in turn pulls in TeX Live as a dependency.
What crazy build are you using where texinfo pulls in texlive?
On Jul 18, 2016 11:03 PM, "Loui Chang" <louipc.ist@gmail.com> wrote:
What crazy build are you using where texinfo pulls in texlive?
Various debian-based things like Raspbian and Ubuntu. Particularly galling on SD-card systems where TeX snarfs ~15% of your storage. And please, it's rather unkind to call another's system 'crazy' ... #timtowtdi Stewart
On Tue, Jul 19, 2016, 07:27 Stewart Russell via talk <talk@gtalug.org> wrote:
On Jul 18, 2016 11:03 PM, "Loui Chang" <louipc.ist@gmail.com> wrote:
What crazy build are you using where texinfo pulls in texlive?
Various debian-based things like Raspbian and Ubuntu. Particularly galling on SD-card systems where TeX snarfs ~15% of your storage.
And please, it's rather unkind to call another's system 'crazy' ... #timtowtdi
Stewart
I thought the Debian package for info was info.
On Tue, Jul 19, 2016 at 07:27:18AM -0400, Stewart Russell via talk wrote:
On Jul 18, 2016 11:03 PM, "Loui Chang" <louipc.ist@gmail.com> wrote:
What crazy build are you using where texinfo pulls in texlive?
Various debian-based things like Raspbian and Ubuntu. Particularly galling on SD-card systems where TeX snarfs ~15% of your storage.
And please, it's rather unkind to call another's system 'crazy' ... #timtowtdi
texinfo does NOT depend on texlive. It suggests it, but suggestions are not installed by default in Debian. now there are a lot of things that seem to recommend texlive, and recommends are isntalled by default, although that can be changed, and on a small system I certainly would. -- Len Sorensen
For bash and awk, manpage is pretty good. They lack examples, though. The best way to get the examples is to ask someone or tutorial (online or presentation).-- William On Sunday, July 17, 2016 8:21 AM, Stewart C. Russell via talk <talk@gtalug.org> wrote: A discussion came up in the Toronto Raspberry Pi Meetup* about suggestions for learning to work in bash. We didn't come up with anything much, but if you have any suggestions, I'd be grateful to hear them. cheers, Stewart *: We had a demo of a Thing That Made Really Big Sparks, plus How Not To Cool a Raspberry Pi 3. It was fun. --- Talk Mailing List talk@gtalug.org https://gtalug.org/mailman/listinfo/talk
If anyone says you need a man(1) just tell them you have better info(1). "Info" is a documentation system that ships with most uni* and often has actual examples. On Sun, Jul 17, 2016, 12:51 PM William Park via talk <talk@gtalug.org> wrote:
For bash and awk, manpage is pretty good. They lack examples, though. The best way to get the examples is to ask someone or tutorial (online or presentation). -- William
On Sunday, July 17, 2016 8:21 AM, Stewart C. Russell via talk < talk@gtalug.org> wrote:
A discussion came up in the Toronto Raspberry Pi Meetup* about suggestions for learning to work in bash. We didn't come up with anything much, but if you have any suggestions, I'd be grateful to hear them.
cheers, Stewart
*: We had a demo of a Thing That Made Really Big Sparks, plus How Not To Cool a Raspberry Pi 3. It was fun.
--- Talk Mailing List talk@gtalug.org https://gtalug.org/mailman/listinfo/talk
--- Talk Mailing List talk@gtalug.org https://gtalug.org/mailman/listinfo/talk
On Sun, 17 Jul 2016, David Thornton via talk wrote:
If anyone says you need a man(1) just tell them you have better info(1).
"Info" is a documentation system that ships with most uni* and often has actual examples.
I much prefer the man pages to info. The man page is more (or at least as) easily searchable. -- Chris F.A. Johnson, <http://cfajohnson.com>
On Sun, 2016-07-17 at 13:39 -0400, Chris F.A. Johnson via talk wrote:
On Sun, 17 Jul 2016, David Thornton via talk wrote:
If anyone says you need a man(1) just tell them you have better info(1).
"Info" is a documentation system that ships with most uni* and often has actual examples.
I much prefer the man pages to info.
The man page is more (or at least as) easily searchable.
But with passing time there's less and less there to search for. Recent man pages can be very perfunctory. I was disappointed at the switch. Gnu created one of the worst hypertext browsers in the world and made that the standard. Mel.
On Sun, 17 Jul 2016 14:30:18 -0400 Mel Wilson via talk <talk@gtalug.org> wrote:
On Sun, 2016-07-17 at 13:39 -0400, Chris F.A. Johnson via talk wrote:
On Sun, 17 Jul 2016, David Thornton via talk wrote:
If anyone says you need a man(1) just tell them you have better info(1). "Info" is a documentation system that ships with most uni* and often has actual examples. I much prefer the man pages to info. The man page is more (or at least as) easily searchable. But with passing time there's less and less there to search for. Recent man pages can be very perfunctory. I was disappointed at the switch. Gnu created one of the worst hypertext browsers in the world and made that the standard.
I guess most of us have not used man pages for so many years, I just did a man turbostat, and that seems fine, with examples, and well laid out... maybe it is only some of the man pages that have become perfunctory? (an example would be super useful, so that I too may have an opinion (or at least a POV) Andre
On Jul 17, 2016 8:21 AM, "Stewart C. Russell via talk" <talk@gtalug.org> wrote:
A discussion came up in the Toronto Raspberry Pi Meetup* about
suggestions for learning to work in bash. We didn't come up with anything much, but if you have any suggestions, I'd be grateful to hear them. I reviewed a Thompson guide for the old Newtlug group. 2000 was quite a few years ago, but the book was aimed at beginners and quite well done. I think it's still available online. http://web.archive.org/web/20010723170926/http://tlug.ss.org/bookreview01.ht...
cheers, Stewart
*: We had a demo of a Thing That Made Really Big Sparks, plus How Not To
Cool a Raspberry Pi 3. It was fun.
--- Talk Mailing List talk@gtalug.org https://gtalug.org/mailman/listinfo/talk
Sent from mobile.
On Sun, 17 Jul 2016, Stewart C. Russell via talk wrote:
A discussion came up in the Toronto Raspberry Pi Meetup* about suggestions for learning to work in bash. We didn't come up with anything much, but if you have any suggestions, I'd be grateful to hear them.
My recommendation is, of course, biased: Pro Bash Programming, by Chris F.A. Johnson -- Chris F.A. Johnson, <http://cfajohnson.com>
On Sun, 17 Jul 2016 13:36:46 -0400 (EDT) "Chris F.A. Johnson via talk" <talk@gtalug.org> wrote:
On Sun, 17 Jul 2016, Stewart C. Russell via talk wrote:
A discussion came up in the Toronto Raspberry Pi Meetup* about suggestions for learning to work in bash. We didn't come up with anything much, but if you have any suggestions, I'd be grateful to hear them. My recommendation is, of course, biased: Pro Bash Programming, by Chris F.A. Johnson
you (humbly) also did not mention that it is already in 2nd edition...
On 17 July 2016 at 08:21, Stewart C. Russell via talk <talk@gtalug.org> wrote:
A discussion came up in the Toronto Raspberry Pi Meetup* about suggestions for learning to work in bash. We didn't come up with anything much, but if you have any suggestions, I'd be grateful to hear them.
I have been particularly happy with Chris F.A. Johnson's books, particularly in view of his preference for trying to be somewhat shell-agnostic, to use generic POSIX facilities where possible. The attempt (which mayn't *always* work, of course) reduces the likelihood that your code will be rife with features that were introduced in one particular version of Bash that might cause all your code to catch fire the moment you find that: a) Oops, I upgraded to a version of Ubuntu that has a different version of Bash that changed that feature; b) Oops, I need to run that script on AIX where they don't have Bash, but rather Korn Shell c) Oops, I need to run that script on a version of CentOS from 2013 that didn't include that new feature that was added in Bash version 4.2 The *clever* things that Chris points out wind up being pretty portable and pretty good at simplifying code. (Dang, where are my notes from his last talk? It's been too long!!!) And they tend to fit well with the traditional Unix "philosophy" of the code attempting to be parsimonious. Short, good, reusable abstractions. -- When confronted by a difficult problem, solve it by reducing it to the question, "How would the Lone Ranger handle this?"
participants (17)
-
ac -
Chris F.A. Johnson -
Christopher Browne -
D. Hugh Redelmeier -
Daniel Wayne Armstrong -
David Thornton -
Ivan Avery Frey -
James Knott -
Kevin Cozens -
Lennart Sorensen -
Loui Chang -
Mel Wilson -
phiscock@ee.ryerson.ca -
Russell Reiter -
Stewart C. Russell -
Stewart Russell -
William Park