The British Government entering in the Gregorian era. Show Sample Output
Displays the same output as "cal", but with the current day highlighted (probably dependent on gnu grep, as I'm not sure other grep's support the "--color=auto" option). Tested and working on Ubuntu 11 and OSX Lion. Show Sample Output
Explanation: * The date command evaluated to today's date with blank padded on the left if single digit * The grep command search and highlight today's date * The --before-context and --after-context flags displays up to 6 lines before and after the line containing today's date; thus completes the calendar. I have tested this command on Mac OS X Leopard and Xubuntu 8.10
print multiple increasing years using cal - calendar -. You can also try
seq Start Increment End
The cal command is handy, but sometimes you want to quickly see today's date highlighted. That's why I came up with this quick command. Much like http://www.commandlinefu.com/commands/view/1342/show-this-months-calendar-with-todays-date-highlighted but cleaner and more succinct. Show Sample Output
Displays last month, current month, and next month side by side. Show Sample Output
If your locale has Monday as the first day of the week, like mine in the UK, change the two $7 into $6 Show Sample Output
Slightly shorter to type
Edit YYYY and MM at the beginning of the command with the year and month you want. Note that `DD=$(printf "%02d" $d)` will pad single digit integers with a leading zero. Substitute `echo $YYYY$MM$DD` at the end of the line with the command you want to launch, for instance script.pl --yyyymmdd $YYYY$MM$DD Also available on GitHub as bash util: https://github.com/fibo/yyyymmdd Show Sample Output
Displays a calendar. Show Sample Output
Today's date on a yearly calendar... credits to http://lifehacker.com/250825/cli-fun--todays-date-on-a-yearly-calendar Show Sample Output
Returns last day of current month. Useful to implement a bash script backup based on a GFS strategy. Show Sample Output
The Linux's `cal` command is nice, but there are times when I need to see two months side by side and this command will do it. Show Sample Output
Show today date on a yearly calendar.
Colors a the current date in cal output Show Sample Output
This is a little trickier than finding the last Sunday, because you know the last Sunday is in the first position of the last line. The trick is to use the NF less than or equal to 7 so it picks up all the lines then grep out any empty lines. Show Sample Output
the -3 show the previous, current, and next month. Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: