Sign in
Google apps
Main menu
Post a Comment On:
j4neiros
"Day of the Week in GAWK"
No comments yet. -
1 – 0 of 0
gawk '
BEGIN {
for (d = 1; d <= 31; d++) {
t = mktime("2008 08 " d " 0 0 0")
print d, strftime("%A", t)
}
}'
The output is:
1 Friday
2 Saturday
3 Sunday
4 Monday
5 Tuesday
6 Wednesday
7 Thursday
8 Friday
9 Saturday
10 Sunday
11 Monday
12 Tuesday
13 Wednesday
14 Thursday
15 Friday
16 Saturday
17 Sunday
18 Monday
19 Tuesday
20 Wednesday
21 Thursday
22 Friday
23 Saturday
24 Sunday
25 Monday
26 Tuesday
27 Wednesday
28 Thursday
29 Friday
30 Saturday
31 Sunday
Compare to: $ cal 8 2008 August 2008 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
posted by J. Ernesto Aneiros at
11:19 AM
on Mar 27, 2012
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
"Day of the Week in GAWK"
No comments yet. -