Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ralph
on Dec 11, 2012
|
parent
|
context
|
favorite
| on:
Unix Text Processing (1987)
The sed and dc combo are perhaps not as readable, but there was a time before the dawn of the One True Awk. :-)
sed '1s/.*/0/; s/;[^;]*$//; s///; s/.*;// s/00$//; s/:..$/+1++/; s/:$/++/; s/:/ 60*/; $s/$/p/' | dc
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: