News for hackers. Stuff that matters.
Re:The Rule of Silence (2006) by ryandrake on Tuesday December 13, 2016 @10:08AM (#13167291)
Let's say I want to know how many days since an asset on my web server has been modified. With bash + some standard unix tools, from the top of my head I have to do something like this:

    curl -svo /dev/null http://example.com/file 2>&1 | grep Last-Modified | cut -d ' ' -f 3-
And that's just to get the last modified date in text form. Now I'm writing a script that parses that date and gets today's date, convert them to days, and subtract. YUCK!

Wouldn't it be nice if your shell could do this?

    curl(http://example.com/file).response_headers.Last-Modified.subtract(date().now).days
I think it would be nice.
Re:The Rule of Silence (2006) by qwertyuiop924 on Tuesday December 13, 2016 @01:20PM (#13169097)
Yes, but as it stands, most of those would have to be builtins for that to work. I would rather have:

   curl -j example.com|select headers.Last-Modified|time before now|time to days
Where the commands send and receive JSON.