skip to main
|
skip to sidebar
j4neiros
My digital hodgepodge
Tuesday, April 13, 2010
Last Sunday of the Month in UNIX shell
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##
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
►
2024
(4)
►
May
(2)
►
February
(1)
►
January
(1)
►
2023
(1)
►
December
(1)
►
2022
(2)
►
November
(1)
►
May
(1)
►
2021
(10)
►
December
(5)
►
August
(1)
►
July
(1)
►
February
(2)
►
January
(1)
►
2020
(4)
►
June
(2)
►
April
(1)
►
January
(1)
►
2019
(3)
►
May
(2)
►
March
(1)
►
2018
(9)
►
October
(1)
►
August
(1)
►
March
(1)
►
January
(6)
►
2017
(4)
►
November
(1)
►
February
(1)
►
January
(2)
►
2016
(9)
►
August
(1)
►
June
(3)
►
May
(1)
►
March
(1)
►
February
(2)
►
January
(1)
►
2015
(20)
►
December
(2)
►
October
(2)
►
September
(2)
►
August
(2)
►
July
(2)
►
May
(1)
►
April
(3)
►
February
(1)
►
January
(5)
►
2014
(20)
►
December
(2)
►
November
(3)
►
October
(4)
►
September
(3)
►
August
(1)
►
July
(1)
►
May
(1)
►
April
(3)
►
January
(2)
►
2013
(21)
►
December
(1)
►
November
(2)
►
October
(2)
►
September
(2)
►
August
(4)
►
July
(1)
►
June
(2)
►
March
(1)
►
February
(1)
►
January
(5)
►
2012
(62)
►
December
(2)
►
November
(3)
►
October
(28)
►
September
(2)
►
August
(1)
►
July
(1)
►
June
(2)
►
May
(1)
►
April
(3)
►
March
(9)
►
February
(5)
►
January
(5)
►
2011
(58)
►
December
(13)
►
November
(4)
►
October
(2)
►
September
(3)
►
August
(10)
►
July
(11)
►
June
(8)
►
May
(2)
►
April
(2)
►
March
(1)
►
January
(2)
▼
2010
(48)
►
December
(1)
►
November
(1)
►
October
(4)
►
September
(17)
►
August
(3)
►
July
(7)
►
June
(3)
►
May
(2)
▼
April
(4)
tcpdump in OpenSolaris
Bluetooth “Access Denied” issue and resolution
Number of days in current Month in UNIX shell
Last Sunday of the Month in UNIX shell
►
February
(3)
►
January
(3)
►
2009
(12)
►
December
(1)
►
November
(2)
►
October
(2)
►
September
(1)
►
August
(2)
►
July
(1)
►
June
(3)
►
2008
(19)
►
December
(1)
►
September
(4)
►
July
(3)
►
June
(2)
►
May
(1)
►
April
(8)
Labels
10
(2)
2011
(4)
2016
(1)
2017
(1)
2018
(1)
2024
(1)
64bit
(1)
actos de repudio
(1)
Administration
(1)
Adriana Zarri
(1)
Anand
(1)
Animal welfare
(2)
Apache
(1)
Apache Ant
(1)
apt
(1)
arping
(1)
Asimov
(2)
ASPCA
(1)
Attachments
(1)
awk
(8)
Babe Ruth
(1)
backup
(1)
Baptism
(1)
basename
(1)
Bash
(7)
beard
(1)
BeautifulSoup
(1)
Belkis Cuza Malé
(1)
bell
(1)
Benedictine
(1)
Bible
(1)
Biblia
(1)
Big Endian
(1)
bishop
(1)
Bloomberg
(1)
Bluetooth
(1)
boot
(2)
BootStrap
(2)
BPF
(2)
browser
(1)
bug
(2)
burn
(1)
business
(1)
C
(2)
C#
(4)
C++
(2)
call
(1)
Capture packets
(1)
Casio
(1)
cd
(1)
center
(1)
Chanukah
(1)
Check
(1)
checkmate
(1)
Chess
(5)
Chess960
(1)
Christ
(2)
Christmas
(4)
Chrome
(1)
City
(1)
CLASSPATH
(1)
clean
(2)
CME
(1)
color scheme
(1)
command line
(2)
compasion
(1)
compassion
(2)
Computer
(2)
Confianza
(1)
copy
(2)
cores
(1)
courses
(1)
CPU
(1)
Cristo
(2)
cron
(1)
cron.d
(1)
Cryptography
(1)
CSV
(1)
Cuba
(4)
Cumpleaños
(1)
Cyber Command
(1)
Damas de blanco
(1)
data types
(1)
database
(1)
DATE
(6)
Date::Manip::Date
(1)
day
(1)
Debian
(1)
Debugging
(1)
Development
(2)
digital signature
(1)
Dios
(2)
dirname
(1)
documentation
(1)
DOS
(1)
dpkg
(2)
dvd
(1)
DVI
(1)
engineering
(1)
Enigma
(1)
epitafio
(1)
equals
(1)
Ernesto
(1)
Eva Cassidy
(1)
Excel
(6)
Exchange
(1)
execution
(1)
Faith
(2)
Federal
(3)
fedora
(12)
Fields of Gold
(1)
file
(1)
filter
(2)
Finder
(1)
Firefox
(1)
firewall
(3)
FIX
(2)
Flash
(1)
FOR
(1)
Foundation and Empire
(1)
Foundation series
(2)
Getopt
(1)
Glassfish
(2)
GNU
(1)
God
(6)
golden rule
(1)
Google
(1)
grep
(2)
Greyhounds
(1)
Guava
(1)
Happiness
(1)
Hardware
(5)
Havel
(1)
Haym Solomon
(1)
Hokusai
(2)
Holidays
(14)
Host
(1)
hours
(1)
Html 5
(1)
hunger
(1)
Hurricane
(1)
hymn
(1)
iburst
(1)
ICE
(1)
Iglesia Bautista
(1)
iLink
(1)
image
(1)
INI file
(1)
Inicio
(1)
Inspirational
(2)
Interval
(1)
interview questions
(1)
IP number
(2)
iproute2
(2)
iptables
(2)
isolate
(1)
Jamaica
(1)
Jane Goodall
(1)
Java
(14)
JavaFX
(1)
JavaScript
(1)
Joel
(1)
John Burroughs
(1)
join
(1)
Juana Borrero
(1)
JVM
(1)
Kasparov
(1)
kernel
(3)
kill
(1)
kill process
(1)
king
(1)
knight
(1)
Last Sunday
(1)
leap year
(1)
learn
(1)
Lent
(1)
Library
(2)
Life
(1)
Linux
(18)
Linux Journal
(1)
list
(1)
Literacy
(1)
Little Endian
(1)
Lizzie
(1)
lock
(1)
log4j
(1)
logging
(1)
Logo
(1)
Louis Leakey
(1)
lsof
(1)
LVM
(1)
Mac OS X
(1)
Macbeth
(1)
Machine
(1)
macro
(1)
Madeleine Delbrêl
(1)
mail
(2)
mail client
(1)
manual
(1)
Map
(3)
Mariel
(1)
Meltdown
(1)
Menorah
(1)
merchant
(1)
Miami
(1)
Microsoft
(1)
motto
(1)
mp3
(2)
MSSQL
(2)
muffin
(1)
Multicast
(2)
Music
(3)
mySQL
(10)
mysqlimport
(1)
Nature
(1)
Navidad
(2)
Netbeans
(1)
netstat
(2)
Network
(17)
NHC
(1)
Norman Rockwell
(1)
NTP
(3)
ntp client
(1)
ntpq
(1)
octal
(1)
ODBC
(1)
Old repositories
(1)
OpenSolaris
(6)
Oración
(1)
Outlook
(1)
packet
(1)
Padding
(1)
painting
(1)
panque
(1)
parameters
(1)
partition
(1)
passengers
(1)
paste
(1)
paswordless
(1)
patriot
(1)
Paul Laurence Dunbar
(1)
Paz
(1)
PC
(1)
pcap
(1)
Perl
(17)
permiso de salida
(1)
persistent
(1)
phone
(1)
PHP
(1)
ping
(1)
pleasure
(1)
Poesía
(3)
poetry
(1)
port
(1)
POSIX
(1)
Poverty
(1)
Prayer
(1)
Problem
(1)
process
(1)
profiling
(1)
Programming
(4)
Promesas
(1)
Promises
(1)
Prosperity Gospel
(1)
ps
(1)
Purpose
(1)
PuTTY
(1)
Python
(6)
queue
(1)
random chess
(1)
REGEX
(8)
relative date
(1)
route
(4)
Sad
(1)
Samba
(2)
schedule
(1)
schtasks
(1)
scraping
(2)
screen
(1)
script
(4)
Scripting
(2)
scripts
(1)
sed
(6)
send
(1)
SendKeys
(1)
Server
(2)
services
(1)
Shakespeare
(1)
shell
(5)
Sniffer
(1)
software
(1)
Solaris
(14)
sort
(1)
sound
(1)
SPARC
(1)
Spectre
(1)
spirituality
(5)
sprintf
(1)
SQLite
(1)
SSH
(1)
starting positions
(1)
stat
(1)
static
(4)
status
(1)
Stewardship
(1)
styles
(1)
subscription
(1)
Subversion
(1)
systemctl
(1)
tablebase
(1)
tag
(1)
Tarjeta blanca
(1)
taskkill
(1)
tcpdump
(4)
TDD
(1)
temporary table
(1)
test
(2)
Threads
(3)
time
(4)
Timezone
(2)
tmux
(1)
tuning
(1)
Ubuntu
(12)
UDP
(1)
UF
(1)
ukiyo-e
(1)
UNIX
(6)
uptime
(2)
USA
(5)
Valhalla
(1)
var
(1)
VBA
(2)
VC++
(1)
version
(2)
versions
(1)
vim
(3)
virus
(1)
Visual Studio
(1)
VLAN
(1)
Walk
(3)
wallpaper
(1)
wav
(1)
weather
(1)
Web
(4)
weekday
(1)
Win
(1)
Windows
(11)
Wireshark
(3)
XP
(1)
xterm
(1)
yum
(1)
zombie
(1)
Search This Blog
My Blog List
My Sites
Picasa
About Me
J. Ernesto Aneiros
View my complete profile
No comments:
Post a Comment