@Don, the only thing that was required is the number of the previous month (following the question in post #3), so year and day do not matter in this case..
@Don, the only thing that was required is the number of the previous month (following the question in post #3), so year and day do not matter in this case..
The question in post #3 was:
Quote:
Could you please help with previous month as well.
Where the 1st two posts were talking about changing the year in a date in the format DD/MM/YYYY. I interpreted the as well to mean that the month as well as the year were to be decremented. I didn't see anything saying that the day was no longer desired.
Looking at it more closely, I agree that the specification was not clear as to whether the request was for a date 13 months ago, a date 1 month ago, or a date in the month before the current month in the year before the current year (which could be 13 months ago or, in January, 1 month ago). Did the as well mean there was a request to get the date corresponding to today in the previous year as well as the date corresponding to today in the previous month; or to get the date corresponding to the current date in the previous month of the previous year.
From post #1, I thought the original request was to get the behavior of the command:
that works on systems where the date utility uses the -d option to specify a time other than now, on a system where the date utility does not have that option.
Hi Gurus,
I would like to get the date for the previous year based on the date I specify.
For e.g. If I input today's date (i.e. 20130422) I need to get 20120422.
We don't have GNU and use K Shell. Any help is highly appreciated.
Thanks
Shash (4 Replies)
My requirement is that when ever search criteria matchs in log file, the previous line just above the search word as well as search word should be print.
sample log file
--03-19T11:26 xxx create version "a.sh@@/main/6"
"104157 "
--03-18T16:01 xxx create version "a.sh@@/main/5"
... (6 Replies)
HELLO...I wanted to ask you, than sure know unix more than me, as I can obtain the following solution: I have a file with rows of the type:
CIAO COME STAI
PERCHE COME STAI
CIAO COME VA
ALLO CHE FACCIAMO
.................
I would that if in a line is present the word (for example) " CHE... (9 Replies)
Hi,
I am a newbie in SHell Programming.
I want to ask something about referring the result of the previous command in Shell-Prog.
For example :
bnm@dsds~> ifconfig
eth0 Link encap:Ethernet HWaddr 00:0B:CD:85:A5:8A
inet addr:192.168.0.2 Bcast:192.168.0.225 Mask... (2 Replies)
Hi all,
Is there a way to bring back the previous unix command without retyping?
I tried the "arror up" key, and it seems not working (sun solaris). What is the correct way?
Thanks! (4 Replies)
Hi ,
after pressing down arrow,up arrow
I want to find previous,next command in unix
wat can i do for tat plz tell me
I am accesing unix server thru telnet.
my shell prompt ksh (4 Replies)