9 More Discussions You Might Find Interesting
1. HP-UX
current date command runs well
awk -v t="$(date +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
subtract 30 days fails
awk -v t="$(date --date="-30days" +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
awk command in hp unix subtract 30 days automatically from current date without date illegal option error... (20 Replies)
Discussion started by: kmarcus
20 Replies
2. Shell Programming and Scripting
SunOS -s 5.10 Generic_147440-04 sun4u sparc SUNW,SPARC-Enterprise
Hi,
In a folder, there are files. I have a script which reads the current date and subtract the modification date of each file.
How do I achieve this?
Regards,
Joe (2 Replies)
Discussion started by: roshanbi
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am reading a particular date from a file using below command
WFLWDATE=$(sed '2q;d' FileA.prm)
The echo command outputs the correct date in variable WFLWDATE
Now I want to subtract 5 minutes from this variable. I am on AIX and unable to get anything working as expected.
Can you... (1 Reply)
Discussion started by: vrupatel
1 Replies
4. Shell Programming and Scripting
I have a file with name and date---
$ cat file.log
userA 01-06-2014
userB 25-05-2014
userC 16-05-2014
userC 01-03-2014
I want to search for the current date and get the name for that date. If current date is not found, go back 1 day and search and so on till it finds the... (2 Replies)
Discussion started by: Nagesh_1985
2 Replies
5. Shell Programming and Scripting
the given time is:
12:13:00
how do i subtract a 10 minutes from any given time?
date '12:13:00' '-10 min'
also tried this:
date +12:13:00 '-10 min' (2 Replies)
Discussion started by: SkySmart
2 Replies
6. Shell Programming and Scripting
Hello All,
I am working on script where I need to add hours,minutes or seconds in the time.Time is not the current but it could be future time.I thought I can store that time in variable and add hours.minutes or second but I am not able to add that in the time that is stores in a variable.
Time... (9 Replies)
Discussion started by: anuragpgtgerman
9 Replies
7. HP-UX
Hi all!
I'm working on a HPUX system, and I was wondering if there is a simple way to convert a date from seconds (since 1970) to a normal date.
Thanks (2 Replies)
Discussion started by: travian
2 Replies
8. UNIX for Advanced & Expert Users
I have the script which appends month and year to the name of the
file. Now every time when I append the month-year combination I
have to subtract 2 months from the current date and then append
it, since we are sending our vendor 2 months prior worth of data
eveytime.
#! /usr/bin/ksh
... (5 Replies)
Discussion started by: mahekr2000
5 Replies
9. Shell Programming and Scripting
I Have a long file like this
123122312 05/06/12
123123456 05/06/14
I want to take the difference of dates in two lines & print difference sidewise for the whole long files.
Pl help me out. (1 Reply)
Discussion started by: vanand
1 Replies