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. UNIX for Beginners Questions & Answers
Hi,
I am trying to add few (say 3 days) to sysdate using -
date -d '+ 3 days' +%y%m%d
and it works as expected.
But how to add few (say 3 days) to a literal date value and how bash treats a literal value as a date. Can we say just like in ORACLE TO_DATE that my given literal date value... (2 Replies)
Discussion started by: pointers1234
2 Replies
4. Shell Programming and Scripting
Hi all,
Need an urgent help on the below scenario.
script:
awk -F","
'BEGIN { #some variable assignment}
{ #some calculation and put values in array}
END {
year=#getting it from array and assume this will be 2014
month=#getting it from array and this will be 05
date=#... (7 Replies)
Discussion started by: vijaidhas
7 Replies
5. Shell Programming and Scripting
Hi All,
I need to find all files other than first two files dates & last file date for month and month/year wise list.
lets say there are following files in directory
Mar 19 2012 c.txt
Mar 19 2012 cc.txt
Mar 21 2012 d.txt
Mar 22 2012 f.txt
Mar 24 2012 h.txt
Mar 25 2012 w.txt
Feb 12... (2 Replies)
Discussion started by: Makarand Dodmis
2 Replies
6. UNIX for Dummies Questions & Answers
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)
Discussion started by: shash
4 Replies
7. Shell Programming and Scripting
Hello Guys
I browsed through site for mentioned requirement all solutions I got in perl
I am looking for something in unix script for same
any suggestions
thanks (1 Reply)
Discussion started by: joshiamit
1 Replies
8. Shell Programming and Scripting
Hi All,
I have two dates: PREVIOUS_DAY and CURRENT_DAY. I need to test the these two values years are same or not.
PREVIOUS_DAY like '%y%m%d' i.e values like 111010, 111011, 111012 etc.
For CURRENT_YEAR:'date +%Y' use this command.
How can derive the year value from PREVIOUS_DAY and... (1 Reply)
Discussion started by: pdathu
1 Replies
9. Shell Programming and Scripting
I what to find a system date in a shell script and search for it in a file in specific record.
If the record (ENDC) has the same date I what to execute another shell script.
Here is example of the file:
Can someone please help me with this ? (3 Replies)
Discussion started by: Lenora2009
3 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I'm very new to script writing - everything I have I got off the Internet. I'm pretty sure I stole this date script from this site.
Anyway, the script works great until I try to obtain a date that falls into last year. I can get 'Dec 31, 2009' but nothing earlier. Below is the... (3 Replies)
Discussion started by: Colel2
3 Replies