Sponsored Content
Top Forums Shell Programming and Scripting How to compare prev day file to current day file Post 11465 by PxT on Wednesday 5th of December 2001 06:33:51 PM
Old 12-05-2001
Re: How to compare prev day file to current day file

Quote:
Originally posted by Smurtzy

Sound like a nightmare??? It is. Here is what I have so far, but I am having a problem figuring out how to name/compare files....
Any help would be greatly appreciated!

Well if you want to do something like:

diff $TODAYSFILE $YESTERDAYSFILE

then there are several ways to determine yesterdays date. Search the board because this is a frequently asked question. (Don't think it officially made it to the FAQ section yet though)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Write a shell script to find whether the first day of the month is a working day

Hi , I am relatively new to unix... Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell.. This is very urgent. Thanks for ur help... (7 Replies)
Discussion started by: phani
7 Replies

2. UNIX for Dummies Questions & Answers

I want to get day from the current system date

Hi, I want to check what day is today (like mon,Tue,wed) When i checked the syntax, i dont see there is a format specifier for getting the day. Let me know how to get the same. I am very new to unix and so I am asking some basic questions. cheers, gops (2 Replies)
Discussion started by: gopskrish
2 Replies

3. Shell Programming and Scripting

Check File Exists and compare to previous day file script

We have data files that are ftp'd every morning to a SUN server. The file names are exactly the same except for that each has the date included in its name. I have to write script to do 2 things: STEP 1) Verify that the file arrived in morning. STEP 2) Compare the file size of the current... (3 Replies)
Discussion started by: rbknisely
3 Replies

4. Shell Programming and Scripting

Script to find previous month last day minus one day timestamp

Hi All, I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this. My Requirment is as below: Input for me will be 2000909(YYYYMM) I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies

5. Shell Programming and Scripting

Command to list current day files only

Hi All, can anyone pls share the command to list the files of current day only. i want to check if there are any files in a particular directory which are not of current date. (6 Replies)
Discussion started by: josephroyal
6 Replies

6. UNIX for Dummies Questions & Answers

Move the files between Current day & a previous day

Hi All, I have a requirement where I need to first capture the current day & move all the files from a particular directory based on a previous day. i.e move all the files from one directory to another based on current day & a previous day. Here is what I am trying, but it gives me errors.... (2 Replies)
Discussion started by: dsfreddie
2 Replies

7. Shell Programming and Scripting

To get Non matching records for current day

My objective is to get the non matching records of previous day with current day. eg, file1 contains 1 a 2 b and file2 contains: 2 b 3 c then expected output is 3 c¨ another example file 1 contains: 1 a 2 b file 2 contains 1 c 2 b (8 Replies)
Discussion started by: newbie2014
8 Replies

8. UNIX for Dummies Questions & Answers

How to save current day files only?

i want to save current day file daily for this is am using below command. cp -p $(ls -lrt | grep "Apr 15" | awk '{print $9}' in order to script this part, i am saving date output in a file using below command date | awk '{print $2,$3}' >>t1 thru below command i want to list the file of... (7 Replies)
Discussion started by: scriptor
7 Replies

9. UNIX for Beginners Questions & Answers

How to test the current days to compare a given day?

Hi, I tested this : #!/bin/bash set +x CurrentDay=$(date +'%a') (Fri) on my server Fri=$(date -d "Friday" | awk '{print $1}') Sat=$(date -d "Saturday" | awk '{print $1}') if ] ; then echo "ok" ; else echo "ok" ; fi But the output tell me always "ok" why?! Thanks in advance :b: (5 Replies)
Discussion started by: Arnaudh78
5 Replies

10. UNIX for Beginners Questions & Answers

Replace date in file every day with current date

I Have text like XXX_20190908.csv.gz need to replace Only date in this format with current date every day Thanks! (1 Reply)
Discussion started by: yamasani1991
1 Replies
NTFSCMP(8)						      System Manager's Manual							NTFSCMP(8)

NAME
ntfscmp - compare two NTFS filesystems and tell the differences SYNOPSIS
ntfscmp [OPTIONS] DEVICE1 DEVICE2 DESCRIPTION
The ntfscmp program makes a comparison between two NTFS filesystems from all aspects and reports all variances it finds. The filesystems can be on block devices or images files. Ntfscmp can be used for volume verification however its primary purpose was to be an efficient development tool, used to quickly locate, identify and check the correctness of the metadata changes made to NTFS. If one is interested only in the NTFS metadata changes then it could be useful to compare the metadata images created by using the --meta- data option of ntfsclone(8) to eliminate the usually uninteresting timestamp changes. The terse output of ntfscmp is intentional because the provided information is enough in each case to determine the exact differences. This can be achieved, for instance, if one compares the verbose outputs of ntfsinfo(8) for each reported inodes by the diff(1) utility. OPTIONS
Below is a summary of the options that ntfscmp accepts. -P, --no-progress-bar Don't show progress bars. -v, --verbose More informational output. -h, --help Display help and exit. EXIT CODES
The exit code is 0 on success, non-zero otherwise. KNOWN ISSUES
No problem is known. If you would find otherwise then please send your report to the development team: ntfs-3g-devel@lists.sf.net AUTHOR
ntfscmp was written by Szabolcs Szakacsits. It was ported to ntfs-3g by Erik Larsson. AVAILABILITY
ntfscmp is part of the ntfs-3g package and is available from: http://www.tuxera.com/community/ SEE ALSO
ntfsinfo(8), ntfscat(8), diff(1), ntfsclone(8), ntfsprogs(8) ntfs-3g 2017.3.23 April 2006 NTFSCMP(8)
All times are GMT -4. The time now is 06:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy