If I execute
cal 2013
in terminal, it echoes the calendar for the year 2013. For the matter of fun, I'd like the terminal to echo
This year won't come.
How should I do this? I tried adding it as an alias to .bashrc, but I cannot create aliases with spaces.
Any ideas?
EDIT:
The final solution:
echo "cal() { if [[ \$@ > \"2012\" ]]; then command echo \"This year won't come.\"; else command cal \"\$@\"; fi; }" >> ~/.profile && source ~/.profile

echo 'cal() {...}') and you can get rid of all the backquotes. – glenn jackman May 20 '11 at 23:50