Prototyping 3 Mar 2013: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Bash thyself! == | == Bash thyself! == | ||
[[File:Serpiente alquimica.jpg|thumb|[[wikipedia:Ouroboros]] ]] | [[File:Serpiente alquimica.jpg|thumb|[[wikipedia:Ouroboros]] ]] | ||
== Example == | |||
A sample pipeline with [[gstspectrum]] | A sample pipeline with [[gstspectrum]] | ||
Line 23: | Line 14: | ||
| ./editwithsox.py $1 \ | | ./editwithsox.py $1 \ | ||
| bash | | bash | ||
== Bash == | |||
Useful things: | |||
* BASH counting loops | |||
* BASH math substitution | |||
* sprintf for filenames | |||
{{vimeo|14969253}} | |||
== Extra == | |||
Using Python's [[argparse]] is great for making flexible command line tools. |
Revision as of 10:16, 4 March 2013
Bash thyself!
Example
A sample pipeline with gstspectrum
Final pipeline:
./gstspectrum input.wav | \ | ./selectmaxcolumn.py \ | ./sortranges.py \ | ./compact.py \ | ./editwithsox.py $1 \ | bash
Bash
Useful things:
- BASH counting loops
- BASH math substitution
- sprintf for filenames
Extra
Using Python's argparse is great for making flexible command line tools.