See? Here's a graph of your productivity gains after using spark: ▁▂▃▅▇
Regular usage:
$ spark 1,2,3,4,5
Using stdin:
$ echo "1,2,3,4,5" | spark --stdin
There's a lot of stuff you can do.
Number of commits to the github/github Git repository, by author:
$ git shortlog -s |
cut -f1 |
tr "\n" ',' |
sed 's/ //g' |
spark
▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▃▁▁▁▁▁▁▁▁▂▁▁▅▁▂▁▁▁▂▁▁▁▁▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁
Magnitude of earthquakes over 1.0 in the last 24 hours:
$ curl http://earthquake.usgs.gov/earthquakes/catalogs/eqs1day-M1.txt --silent |
sed '1d' |
cut -d, -f9 |
tr "\n" ',' |
sed 's/ //g' |
spark
▅▆▂▃▂▂▂▅▂▂▅▇▂▂▂▃▆▆▆▅▃▂▂▂▁▂▂▆▁▃▂▂▂▂▃▂▆▂▂▂▁▂▂▃▂▂▃▂▂▃▂▂▁▂▂▅▂▂▆▆▅▃▆
Code visualization. The number of characters of spark
itself, by line, ignoring empty lines:
$ awk '{ print length($0) }' spark |
grep -Ev 0 |
tr "\n" ',' |
spark
▁▁▁▁▅▁▇▁▁▅▁▁▁▁▁▂▂▁▃▃▁▁▃▁▃▁▂▁▁▂▂▅▂▃▂▃▃▁▆▃▃▃▁▇▁▁▂▂▂▇▅▁▂▂▁▇▁▃▁▇▁▂▁▇▁▁▆▂▁▇▁▂▁▁▂▅▁▂▁▆▇▇▂▁▂▁▁▁▂▂▁▅▁▂▁▁▃▁▃▁▁▁▃▂▂▂▁▁▅▂▁▁▁▁▂▂▁▁▁▂▂
Sounds like a wiki is a great place to collect all of your wicked cool usage for spark.
- php-spark doesnt support whitespaces like
1, 2, 3
- If you use space as a separator you should quotes like
$ spark "1 2 3 4"
- Add support for width by using
-w
as an argument