Sign in
Google apps
Main menu
Post a Comment On:
j4neiros
"Last Sunday of the Month in UNIX shell"
No comments yet. -
1 – 0 of 0
cal | grep '^[23]' | tail -1 | cut -d' ' -f1
Several months later I don't remember why the grep part?
cal | tail -1 | cut -d' ' -f1
AWK version:
#!/bin/bash
cal | awk '
{ last = $1 }
END { print last }'
##END##
posted by J. Ernesto Aneiros at
2:13 PM
on Apr 13, 2010
Leave your comment
You can use some HTML tags, such as
<b>, <i>, <a>
Choose an identity
Google Account
You will be asked to sign in after submitting your comment.
Name/URL
Comment with your Google account if you’d like to be able to manage your comments in the future. If you comment anonymously, you won’t be able to edit or delete your comment.
Learn more
Name
URL
Anonymous
Comment with your Google account if you’d like to be able to manage your comments in the future. If you comment anonymously, you won’t be able to edit or delete your comment.
Learn more
Please prove you're not a robot
"Last Sunday of the Month in UNIX shell"
No comments yet. -