Search Results

Search: Posts Made By: kmarcus
Forum: HP-UX 01-21-2019
12,673
Posted By kmarcus
date: illegal option -- - Usage: date [-u]...
date: illegal option -- -
Usage: date [-u] [+format]
date [-u] [mmddhhmm[[cc]yy]]
date [-a [-]sss.fff]
that is the error returned after I run the code awk -v t="$(date...
Forum: HP-UX 01-21-2019
12,673
Posted By kmarcus
I want to awk data from a log file with dates...
I want to awk data from a log file with dates thus want to filter 30 days before the system date
awk -v t="$(date --date="-30days" +%Y-%m-%d)" -F "'" '$1 < t' myname.datbut that returns an error
...
Forum: HP-UX 12-24-2018
12,673
Posted By kmarcus
no it doesn't have ksh93 I have Version 11/16/88...
no it doesn't have ksh93 I have Version 11/16/88 the very first 88 release on the HP UX server namely
/bin/ksh:
$ B.11.31 Oct 1 2008 01:54:10 $
Version 11/16/88
...
Forum: HP-UX 12-24-2018
12,673
Posted By kmarcus
hello when I run printf '%(%s %Y-%m-%d...
hello
when I run
printf '%(%s %Y-%m-%d %H:%M:%S)T\n'
I get the following error
printf: Error processing format
printf: Error processing format
printf: Error processing format
printf: Error...
Forum: HP-UX 12-24-2018
12,673
Posted By kmarcus
awk command in hp UNIX subtract 30 days automatically from current date without date illegal option
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...
Forum: What is on Your Mind? 12-20-2018
1,688
Posted By kmarcus
awk -v t=$(date +%Y-%m-%d) -F "'" '$1 < t'...
awk -v t=$(date +%Y-%m-%d) -F "'" '$1 < t' myname.dat
I have the above unix command to filter text with dates older than the current date on unix HP-UX
how can I modify it to filter dates 30...
Forum: What is on Your Mind? 12-19-2018
1,688
Posted By kmarcus
$ awk '$NF < "2018-05-01"' ip.txt hello I am...
$ awk '$NF < "2018-05-01"' ip.txt
hello I am using Unix the script I am looking for should automatically pick the date from the system current date rather than manually typing the date and move text...
Forum: What is on Your Mind? 12-18-2018
1,688
Posted By kmarcus
Grep file containing dates
How to grep a file containing dates to only last 30 days then move to another folder
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 09:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy