David Hancock

Dec 19

Where the parentheses go… (and seq)

I have a dickens of a time remembering how to parenthesize a pipeline of commands so they can be timed as a group. Here’s a snippet I read on the net today (from a post about reducing Python’s memory footprint):

time (for i in $(seq 1 100); do python -c "pass"; done)

So, parentheses around everything to be timed. The seq command work on my Linux box (/usr/bin/seq) but not my Macbook.