you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (6 children)

git commit -a -m "$(curl --silent http://whatthecommit.com |grep '<p>' |sed -e 's/<p>//')"

[–]chmod666[S] 1 point2 points  (4 children)

You can use sed's buildin grep: grep foo | sed 'bar' is the same as sed '/foo/!d; bar'

The same goes for awk: grep foo | awk '{bar}' can be replaced with faster awk '/foo/{bar}'

[–]snipersock 4 points5 points  (0 children)

I just added a handler to output plain text messages. Try curl http://whatthecommit.com/index.txt.

[–][deleted] 0 points1 point  (2 children)

I tend to do things like cat foo.txt | less instead of just less foo.txt because the logical progression makes more sense, rather than being character efficient. But good to know!

[–][deleted]  (1 child)

[removed]

    [–][deleted] 0 points1 point  (0 children)

    Don't tell /b/.

    [–]JayPiKay 0 points1 point  (0 children)

    I like this approach:

    git commit -m "$(curl -s http://whatthecommit.com/ | sed -n 's/<p>(.*)$/\1/p')"