9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
How to compare two files whether they are same are not...? like i had my input files as 20141201_file.txt and 20141130_file2.txt
how to compare the above files based on date .. like todays file and yesterdays file...? (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies
2. Shell Programming and Scripting
Hello,
I'd like to write a monthly archive script that archives some logs. But I'd like to do it based on yesterday's date. In other words, I'd like to schedule the script to run on the 1st day of each month, but have the archive filename include the previous month instead.
Here's what I... (5 Replies)
Discussion started by: nbsparks
5 Replies
3. Shell Programming and Scripting
Hi
I want to get tomorrow and yesterday date from date command. My shell is KSH and server is AIX. I tried several options, but unable to do. Please help on this.
Regards
Rajesh (5 Replies)
Discussion started by: rajeshmepco
5 Replies
4. Shell Programming and Scripting
Hello,
I have a file like this:
2012112920121130
12345620121130msABowwiqiq
34477420121129amABamauee
e7748420121130ehABeheheei
in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Discussion started by: Lilu_CK
3 Replies
5. Shell Programming and Scripting
Hi,
I want to compare today's date(DDMMYYYY) with yesterday(DDMMYYYY) from system date,if (today month = yesterday month) then execute alter query else do nothing.
The above requirement i want in Shell script(KSH)...
Can any one please help me?
Double post, continued here. (0 Replies)
Discussion started by: kumarmsk1331
0 Replies
6. Shell Programming and Scripting
Hi
i am having a backup folder wherein i will be having the files ftp ed to remote server, i need to keep only the data of last two days and remove the old log files.
how can i achieve this ?
i have tried...
#!/bin/bash
D=`date +'%d'`
oldday=`expr $D - 2`
rm /sent/data-$oldday*
echo... (8 Replies)
Discussion started by: aemunathan
8 Replies
7. Shell Programming and Scripting
Dear All,
Actually, i'm doing some reporting job and i need to pass yesterday's date in Year-Month-Day format(e.g. 2009-06-10) to another program for generating 2009-06-10 report.
to get today's date, it's easy to just date '+%Y%m%d' , but no idea how can i get this kind of format for... (2 Replies)
Discussion started by: tiger2000
2 Replies
8. 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
9. Shell Programming and Scripting
I need o get yesterday's day of week but im not exactly sure. the actual name is what i want. I can do it with numbers but im not sure with words. (3 Replies)
Discussion started by: rcunn87
3 Replies