10 More Discussions You Might Find Interesting
1. Answers to Frequently Asked Questions
I m working on shell scripting and I m stuck where in my .txt file there is column as expiry date and I need to compare that date with system date and need to remove all the rows where expiry date is less than system date and create a new .txt with update. (1 Reply)
Discussion started by: Stuti
1 Replies
2. UNIX for Beginners Questions & Answers
Can someone help me with the code wherein there is a file f1.txt with different column and 34 column have expiry date and I need to get that and compare with system date and if expiry date is <system date remove those rows and other rows should be moved to new file f2.txt .
I don't want to delete... (2 Replies)
Discussion started by: Stuti
2 Replies
3. 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
4. Shell Programming and Scripting
Hi,
Anybody knows how to get what date was 28 days ago of the current system date through UNIX script.
Ex : - If today is 28th Mar 2010 then I have to delete the files which arrived on 1st Mar 2010, (15 Replies)
Discussion started by: kandi.reddy
15 Replies
5. 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
6. UNIX for Dummies Questions & Answers
I am looking for a tool that allows us to override the system date-timestamp on the Unix servers so that we can perform regression tests using the same set of scripts and data. CDS is an example of a system where the logic is very date/time dependent. It would make regression testing much easier... (5 Replies)
Discussion started by: DavidH
5 Replies
7. 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
8. UNIX for Dummies Questions & Answers
IS there a way to use the unix date command to find the 2nd Saturday fo every month?
Each Month I want to execute a specific command only of the 2nd Saturday. (1 Reply)
Discussion started by: redsoxfan
1 Replies
9. Shell Programming and Scripting
Hello...I have have the value of date command stored in a particular format in a variable...Is there any way by which I can increment the value of the date using unix only?Until now i was calling an sql query to increment the date..
Thanks (6 Replies)
Discussion started by: tej.buch
6 Replies
10. UNIX for Dummies Questions & Answers
Hi there
I am using the following command to get today's date:
Date=`date '+%Y%m%d'`
This has the format 20040409
What I want is today's date -1 i.e. get yesterdays date.
What is the command for this?
Thanks :) (1 Reply)
Discussion started by: niamh
1 Replies