Skip to content
0:00 / 0:00

#unix#shell#bash

The Unix Chainsaw - Gary Bernhardt

timmonta

31 subscribers • 1 video on Hallway

YouTube
  • Recommended by 2 people: 2 on Hacker News.
  • Presented by Gary Bernhardt

Intermediate. Assumes working knowledge.

25K views11 years ago2 recommendations

Tools and practiceSystems programmingThe shell and command lineLinuxDeveloper productivity

Gary Bernhardt demonstrates how to build interactive Unix shell pipelines iteratively to solve practical problems.

Cascadia Ruby Conference 2011

Why it's here

2 people recommend this

What people say. Highly recommended for demonstrating the iterative, interactive process of building Unix command-line pipelines.

agumonkeyon Hacker News • Recommends

On “Programming blogs”

From the same person: - The unix chainsaw, how to use tiny tools1 as lever upon themselves. No absurd wit as in wat. Simply brilliant. link to this video - Also listed above the wat page, link : boundaries, a whole new world. More abstract wishful thinking. Still brilliant.

pdkl95on Hacker News • Recommends

On “Problem solving with Unix commands”

…olves a complicated problem. This talk demonstrates the part that isn't included in the the usual tutorials or "cool 1-line command" lists: the cycle of "Try something. Hit up to get the command back. Make one iterative change and try again." 1 You might know him from his other hilarious talks like "The Birth & Death of JavaScript" or "Wat". 2 link to this video…

pdkl95on Hacker News • Mentions

On “Twice as happy customers means half the marketing spend”

I know I've had a few situations where the "play around with the numbers" part happened first. Usually once the actual goal was known the algebra (or similar details) would be obvious... but sometimes the inefficient/toy implementation was good enough. Sometimes half-assed is ok, if it's the the right half of the ass.1 The wrong half becomes yet another type of technical debt to be refactored "someday". (this is not an excuse to ignore algebra or blindly assume the easiest/most-fun method is correct/useful/sane) 1 link via link to this video

pdkl95on Hacker News • Mentions

On “Understanding the fork system call in Unix”

As others have already menti9oned, running 'bc' isn't actually that expensive. Comparing it to Bitcoin is ridiculous. Let's investigate the actual cost of that sum: $ cat foo.sh #!/bin/bash a="1.5" b="0.5" sum="$(echo "${a} + ${b}" | bc)" echo "The sum of ${a} and ${b} is ${sum}" $ /usr/bin/strace -q -D -w -c ./foo.sh The sum of 1.5 and 0.5 is 2.0 % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 55.53 0.001225 123 10 read 9.75 0.000215 215 1 execve 5.53 0.000122 7 18 mmap 4.03 0.000089 8 11 3 open 3.04 0.000067 7 10 mprotect 2.99 0.000066 5 13 rt_sigprocmask 2.54 0.000056 56 1 clone 2.45 0.000054 5 10 close 2.40 0.000053 5 11…

btschaeggon Hacker News • Mentions

On “Ask HN: I’m New to Computer Science and Engineering. Any Advice?”

1.) Be curious. Stay curious. Experiment, play with things. Your time during university is likely the best time for this and it will likely get harder later on when you're on the job and there's much more emphasis on finished work than on learning experiences. Also, I'm quite sure that it will be beneficial for you if you familiarize yourself with different ways of thinking (obviously programming languages, environments and paradigms, but that will likely apply to anything non-technical, as well). I gained this perspective from dealing with people who didn't really do that, but also from knowing that I personally also did this way too late (and from the benefits it brought me nonetheless). I…