No, I did not try the example, I read it with my unqualified skill level and assumed it would simply return todays date. I should have actually taken the time to type this in to the terminal, when I did, it indeed returned what I needed.
... ... ...
Again thank you to everyone for you assistance, and apologies for my incorrect assumptions. Lesson learned, when you don't know what you are talking about (that's me!), it's best to shut up
We don't want you to shut up. We want you to learn. When you ask a question, and you get one or more suggestions; if you don't understand what it does:
try it, or
look at the man page for the suggested utility to see what it should do, or
both.
And then:
report back to us what happened,
thank people who gave you working suggestions, or
explain what you got and how that was different from what you were trying to do.
And, if you got something that works, but you can't figure out how it works, ask questions. Most of the volunteers who make suggestions here are happy to explain what their (or someone else's) code does. We want to help you learn how to make the most out of the tools that are available to you.
And, for other people reading this thread. If you wanted to do something like what was requested here on a system that doesn't have gawk and has a date utility that doesn't support the --date option, but you do have access to a 1993 or later version of the Korn shell (such as on Mac OS/X), you could also try:
which with the given sample input file produces:
This User Gave Thanks to Don Cragun For This Post:
Hi ,
I am working at Unix system,using c lang.
I need c fun which return the day of the week .
For example :
0- Sunday.
1- Monday.
....
10x. (4 Replies)
I need o get yesterday's day of week but im not exactly sure. the actual name is what i want. I can do it with numbers but im not sure with words. (3 Replies)
Hi All,
Our system is running on Solaris 8 and we are using US locale. By default the First Day Of Week is Sunday, is it possible for us to change it to Monday?
I have googled it but found very little of use.
THanks in advance. (2 Replies)
How to find the Day of the Week of the given Date using perl?
If I have a date in YYY--MM-DD format, how to find the DOW? Based on that, I need to find the following sunday.
Pls help. (5 Replies)
Hi All,
I have date in string format 'YYYY-MM-DD'. I want to know day of the week for this date.
Example. For '2005-08-21' my script should return '0' or Sunday
For '2005-08-22' it should return '1' or Monday
I want piece of code for HP-UX korn shell.
Appreciate reply on this. (5 Replies)
In HP-UX the date command does not have the "-d" switch like some other *nixes do. I'm working a simple script to tell me, given the day, month and year what day of the week that falls on.
Assuming valid day, month and year input (I'd perform quality checks on the input separately, but not... (5 Replies)
I have been volunteered by my boss to be the sysadmin for our production redhat server. He asked me to tighten the security to avoid mishaps like "rm -f *" that occured not long ago.
Right now, we have 53 users sudo-ing into the machine and it is an audit nightmare. I am wondering if it... (15 Replies)
Hi All,
I have the below requirement ,
if i give the week number for ex 41 i need to get the date for Monday and thursday for this given week. my expected output is 13/10/2014 (Monday's date) and 16/10/2014 (Thursday's date)
I am using GNU LINUX .
Pls help me with your thoughts.
Thanks in... (7 Replies)