<br>Isn't the Internet is built out of a series of pipes?<br><br>----- Reply message -----<br>From: "Mike Miller" <mbmiller+l@gmail.com><br>To: "TCLUG Mailing List" <tclug-list@mn-linux.org><br>Subject: [tclug-list] teaching Linux/Bash to new users - recommendations?<br>Date: Thu, Mar 21, 2013 10:03 am<br><br><br>On Thu, 21 Mar 2013, Jake Vath wrote:<br><br>>> or an explanation of pipes, or how to use the semi-colon on the command <br>>> line, or parentheses to make subshells, but some of those are even a <br>>> little advanced.<br>><br>> Yeah, subshells and an actual explanation of pipes and how they work is<br>> quite advanced...<br><br>I wouldn't explain pipes much except to say that we can capture output <br>instead of sending it to the screen, for example:<br><br>grep foo file | less<br><br>Then we have to do stuff like<br><br>sort file | head<br><br>The pipe is pretty central to stuff we normally do, so they need that. <br>Subshell can wait, but this is the kind of thing I do a lot, when a flat <br>db text file has a header line with field names:<br><br>( head -1 file ; tail -n+2 file | sort ) > outfile<br><br>That sorts the file except for the header line and preserves the header. <br>We might not get to that in the first class, which is 1 hour 15 mins.<br><br><br>>> The biggest questions I have are about the best order to teach things <br>>> in. What's best -- explain the concept of a shell, or just start typing <br>>> commands?  Probably the former, then go to the kernel/shell concept, <br>>> then back to commands.<br>><br>> I think you're right.<br>> I'd start out with a little history on the shell, this doesn't have to be<br>> Bash specific.<br>> Just touch on the conception of, "The Shell".<br><br>I think I will do that.  "Everyone log in.  OK, now each of you is in your <br>own shell..."  It sounds appealing.  "When you type a command, your shell <br>interprets it and decides what to do."  Then I can talk about <br>personalizing the experience for different accounts.<br><br><br>> Maybe mention some stuff about how a shell is a command interpreter.<br>> It's another layer of abstraction between the operating system and the user.<br>> Mention something to the affect of shell scripting is *really* just a way<br>> of gluing together system calls, tools, utilities, and other programs.<br>> Why do we need a shell? What you can do/should do/ should not do with the<br>> shell.<br>> Mention shell limitations.<br>><br>> How much time do you have with these students? One day?<br><br>There will be 2.5 hours total in two classes, but almost all of this basic <br>stuff needs to be in the first class, so it will be good to direct them to <br>online resources.  The second class has to focus more on a particular kind <br>of statistical analysis job that they will often run.  We're using Torque <br>PBS, so they have to learn that, too.<br><br>Mike<br>_______________________________________________<br>TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br>tclug-list@mn-linux.org<br>http://mailman.mn-linux.org/mailman/listinfo/tclug-list<br>