Archive for the 'GNU/Linux' Category

Self-contained crontab Cheatsheet

This time I’m bringing you a self-documented cron table file (with an example), that is, a tidy cheatsheet diagram embedded as comments that does just one thing, helps you remember the crontab syntax:

# * * * * * command to be executed
# - - - - -
# | | | | |
# | | | | +—– day of week (0 - 6) (Sunday=0)
# | | | +——- month (1 - 12)
# | | +——— day of month (1 - 31)
# | +———– hour (0 - 23)
# +————- min (0 - 59)

# Alarm clock set to 6:30AM
30 6 * * * /home/nano/alarm

I hope you find it useful, thanks for reading and happy May Revolution Day to everyone!

The Awakeness of Shell Scripting with AWK

I guess I’m getting too used to the “it’s been a while!” thingy so, awkward title aside, let’s just move straight to today’s post:

The more I learn about AWK, the more I love it. It’s just that simple. I’ve been trying its powers a bit and came with an awk-mazing (and probably useless, but still exciting) five-lines (sans comments) cute script that emulates the most popular feature (the “-e” option) of our good ol’ boy apropos.
Enter lazyman!

#!/bin/bash
#
# lazyman.sh - displays the name section of some program’s man
# page.
#
# DESCRIPTION
# this tiny script shows the NAME section of a given program’s
# manual page, displaying an output quite similar to
# “apropos -e” but directly calling “man” instead of querying
# against “mandb”.
#
params=$(echo $@ | awk ‘END{print NF}’)
case $params in
1) man $1 | awk ‘/NAME/{getline;print}’ ;;
*) echo “usage: lazyman.sh [program]” ;;
esac

That’s all folks! I hope you’ve enjoyed it and thanks for reading!

Installations Made Easy with BitNami Stacks

Open Source. Simplified

BitNami stacks make it incredibly easy to install your favorite open source software. Application stacks include an open source application and all the dependencies necessary to run it, such as Apache, MySQL and PHP or Ruby.

Learn More »

Inside VMware Fusion

Join Ben Gertzfield of VMware for a look behind the curtain at virtualization on the Mac, the technology that frees operating systems from their earthly hardware chains.

Ben Gertzfield is the lead developer of VMware Fusion for Mac, VMware’s first virtualization solution for Intel Macs, currently available for free trial download.

Next Page »