<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">I wouldn't explain pipes much except to say that we can capture output 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></blockquote>
Ohh, that makes sense.<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">The pipe is pretty central to stuff we normally do, so they need that.
Subshell can wait, but this is the kind of thing I do a lot, when a flat
db text file has a header line with field names:<br>
<br>
( head -1 file ; tail -n+2 file | sort ) > outfile<br></blockquote><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div>That sorts the file except for the header line and preserves the header. <br>
</div></blockquote><div>I think that might be a good way to approach something like this, at least for the non-superuser type people.<br>I mean, people who want the functionality, but lack the background experience/knowledge.<br>
Learning out of necessity is great to learn(sometimes).<br><br>It might help to present a problem, find a solution, prove the solution does <i>exactly</i> what you want it to do, and in the end explain why the solution works.<br>
<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">We're using Torque PBS, so they have to learn that, too.<br></blockquote><div>That's pretty neat. What are you guys doing with Tourque? <br>
</div></div><br>-> Jake<br><br><div class="gmail_quote">On Thu, Mar 21, 2013 at 10:03 AM, Mike Miller <span dir="ltr"><<a href="mailto:mbmiller+l@gmail.com" target="_blank">mbmiller+l@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, 21 Mar 2013, Jake Vath wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
or an explanation of pipes, or how to use the semi-colon on the command line, or parentheses to make subshells, but some of those are even a little advanced.<br>
</blockquote>
<br>
Yeah, subshells and an actual explanation of pipes and how they work is<br>
quite advanced...<br>
</blockquote>
<br></div>
I wouldn't explain pipes much except to say that we can capture output 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. Subshell can wait, but this is the kind of thing I do a lot, when a flat 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. We might not get to that in the first class, which is 1 hour 15 mins.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The biggest questions I have are about the best order to teach things in. What's best -- explain the concept of a shell, or just start typing commands? Probably the former, then go to the kernel/shell concept, then back to commands.<br>
</blockquote>
<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>
</blockquote>
<br></div>
I think I will do that. "Everyone log in. OK, now each of you is in your own shell..." It sounds appealing. "When you type a command, your shell interprets it and decides what to do." Then I can talk about personalizing the experience for different accounts.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
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></div>
Mention something to the affect of shell scripting is *really* just a way<div class="im"><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>
</div></blockquote>
<br>
There will be 2.5 hours total in two classes, but almost all of this basic stuff needs to be in the first class, so it will be good to direct them to online resources. The second class has to focus more on a particular kind of statistical analysis job that they will often run. We're using Torque PBS, so they have to learn that, too.<span class="HOEnZb"><font color="#888888"><br>
<br>
Mike</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br>
<a href="mailto:tclug-list@mn-linux.org" target="_blank">tclug-list@mn-linux.org</a><br>
<a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" target="_blank">http://mailman.mn-linux.org/<u></u>mailman/listinfo/tclug-list</a><br>
</div></div></blockquote></div><br>