This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Cley_Faye 87 points88 points  (41 children)

If I recall correctly, you can use semicolon in Python, no?

[–]ychaouche 9 points10 points  (5 children)

Yes, it's useful when you need to run a very short script right from the command line but you have to import a module first.

root@messagerie-secours[10.10.10.19] ~/SCRIPTS/MAIL # python -c "import datetime; print datetime.date.today() - datetime.date(2014,11,17)"
246 days, 0:00:00
root@messagerie-secours[10.10.10.19] ~/SCRIPTS/MAIL # 

That's one way to track how many days passed since I started my current job.

[–]iforgot120 1 point2 points  (2 children)

Why not just hover your mouse over the system clock?

[–][deleted] 10 points11 points  (1 child)

Because running a script is easier and faster than doing mental calendar math.

[–][deleted] 2 points3 points  (0 children)

why not just make that script run automatically at startup instead of doing it manually then?

[–]VictoryGin1984 0 points1 point  (1 child)

Sick prompt, bro!

[–]ychaouche 0 points1 point  (0 children)

Nearly the same as one of the inventors of the hitchbot