I have a date that looks like this:
2008/100:18:40:47.040
I need it to look like this:
2008 04 09 18 40 47 040
I have looked at datecalc and it doesn't seem like it takes the day of year for this year (or whatever year is input) and converts it into month and day. It also has to account... (2 Replies)
does any one have any ideas how i would go about calculating the number of days left in the month from a bash script ?. I want to do some operations on a csv file according to the result (8 Replies)
I am writing a script that requires the number of days in any given month.
In the shell, I can use the command:
cal `date +%m` `date +%Y`| grep -v '' | wc -w
to give me the number of days in the month, but when I assign it to a variable:
VAR=`cal `date +%m` `date +%Y`| grep -v '' | wc... (3 Replies)
Hi all. I am scripting in a POSIX shell on HPUX.
I am running a script that needs to determine the number of days in a month.
I found this on the forum and it works great:
X=`cal $(date +%m) $(date +%Y) | grep -v '' | wc -w`
The issue is that I am running the script on the 7th day of... (11 Replies)
Hi,
I have an issue in date processing, the issue is I have a month as an int ( 1 - 12 ), the weekday as int ( 0 - 6 , 0 = Sunday), and the week day in month as int ( 0 - 5, 5 = last ex: first sunday, last monday, third tuesday ... ), now from those three parameters is there a possible way to... (5 Replies)
Hi,
I have an issue in date processing, the issue is I have a month as an int ( 1 - 12 ), the weekday as int ( 0 - 6 , 0 = Sunday), and the week day in month as int ( 0 - 5, 5 = last ex: first sunday, last monday, third tuesday ... ), now from those three parameters is there a possible way to... (2 Replies)
hi all
searched google and here, cant find and am begining to suspect there is no options for this.
shell = born
with either the date or cal command I need to display the number of days in current month. can anyone point me in the right direction? (10 Replies)
Hi,
I would like to ask about some question on the -mtime option in the find command. I want to move a log files older than one month and planning to used the find -mtime +30 but i have some clarrification does -mtime +30 or -30 refer to x days beyond or between so how about the month. suppose... (2 Replies)
I have a homework assignment:
----------------------------------------
"Display" the number of days in the current month. For example:
September 1996 has 30 days
----------------------------------------
I am trying to just display the head of cal to start the sentence.
eg. cal | head
... (1 Reply)