10 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. UNIX for Beginners Questions & Answers
I am trying to work on a script to grab the UTC time from a website
So far I was able to cobble this together.
curl -s --head web-url | grep ^Date: | sed 's/Date: //g'
Which gives me the result I need.
Wed, 06 Dec 2017 21:43:50 GMT
What I need to is extract the 21:43:50 and convert... (4 Replies)
Discussion started by: allisterB
4 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am new to Unix and need some help with a problem I have.
I have been asked to ftp a file(s) from a directory to another system.
I need to be able to allow the current days file to build and only send any other file across that is in the directory. I need a peice of code that will read... (3 Replies)
Discussion started by: darrenwg99
3 Replies
4. Shell Programming and Scripting
Hi fellows,
I need to define a notification for SSL certificate expiration.
My Command output is below: (this is the "Expiration Date")
Tue Mar 15 09:30:01 2012
So, at 15th Feb (1 month before the expiration), a notification has to be triggered by a script or sth else. How can i set an... (5 Replies)
Discussion started by: oduth
5 Replies
5. Shell Programming and Scripting
I'm still up trying to figure this out and it is driving me nuts.
I have a log file which has a basic format of this...
2010-10-10 22:25:42
Init block 'UA Deployment Date': Dynamic refresh of repository scope variables has failed.
The ODBC function has returned an error. The database... (4 Replies)
Discussion started by: k1ko
4 Replies
6. Shell Programming and Scripting
Hi all:
Trying to parse a log file of rsync activity to get the amount of date being transferred. The log file contains multiple dates and what I am trying to do is get the file sizes for the current date.
What I have been trying to do is pipe it through awk but I am having trouble retrieving... (1 Reply)
Discussion started by: raggmopp
1 Replies
7. Shell Programming and Scripting
I am currently running the following Korn shell script which works fine:
#!/usr/bin/ksh
count=`db2 -x "select count(*) from schema.tablename"`
echo "count"
I would like to add a "where" clause to the 2nd line that would allow me to get a record count of all the records from schema.tablename... (9 Replies)
Discussion started by: sasaliasim
9 Replies
8. UNIX for Dummies Questions & Answers
Hi All
There is a file "apple_2008-08-15.log".
I have to use grep on this file to collect my test log. There are 45 such files. Is there a command that I can use to dynamically substitute the daily date as part of the file name? As of now Iam renaming the file to the new date and running my... (6 Replies)
Discussion started by: pk_eee
6 Replies
9. Shell Programming and Scripting
I have a file that was created yesterday that I want to access...
daily.log2008-02-16
I am using...
curr_time=`date +"%Y %m %d"`
yesterday=`./datecalc.ksh -a $curr_time - 1`
the value for yesterday is now "2008 2 16"
in ksh, how do I transform the string "2008 2 16" into "2008-02-16" (5 Replies)
Discussion started by: martyb555
5 Replies
10. Shell Programming and Scripting
Hello,
I'm trying to update some scripts here that parse our system logs daily. They report information just fine... but they just report too much info.
Specifically, if there's been some failed login attempts on several different days (say Monday and Tuesday), when I get the report from... (5 Replies)
Discussion started by: cjones
5 Replies