Link to home
Create AccountLog in
Avatar of stopm
stopmFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Script to match two files

Hi

I need a script for linux server that will check if two files match except for the last extension (.TXT)  If there is a match i want to ftp them both somewhere else and remove them from this directory.

The files names will be in this format where the first part of the file name is the current date time. eg

DateTime_A_B_C
DateTime_A_B_C.TXT

The file with .TXT extension will be the indicator that the other file has been deposited and that both files can be moved

There will be other files in the directory which will be in same format but will have different  'DateTime'  prefix's so only want to move the ones that have a matching .TXT file
ASKER CERTIFIED SOLUTION
Avatar of Barthax
Barthax
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account