Sponsored Content
Top Forums Shell Programming and Scripting Script for Comparing directories and file from a text file Post 302772038 by saurau on Friday 22nd of February 2013 01:56:11 PM
Old 02-22-2013
Script for Comparing directories and file from a text file

Hello all,
I need to write a script which has following requirement:

Need to read the filenames from text file and then search for the above read files in the required directory and if match found backup them in a backup folder.
And also need to compare and verify whether the files in the two directories are same.
(need to verify time stamps and files sizes too.)

The text file is like below :
Quote:
SecurityProviders/ldapSecurityProvider.lsl Message Broker File
SecurityProviders/tfimSecurityProvider.lsl Message Broker File
bin/bipbroker Message Broker File
bin/bipservice Message Broker File
cachesupport/lib/cachesupport.jar Message Broker File
classes/connectors.jar Message Broker File
lib/libImbCmdLib.so Message Broker File
lib/libImbRdl.so Message Broker File
lib/libJDBCType4JNISinglePhaseTrxn.so Message Broker File
lib/libJMSJNILocalTrxn.so Message Broker File
lib/libMQLibrary.so Message Broker File
lib/libMbAdapterJNISinglePhaseTrxn.so Message Broker File
Please help.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Comparing file names to text document

Hi All, I'm really new to Unix scripts and commands but i think i'm eventually getting the hang of some of it. I have a task which is to create some kind of script which compares the file names in a directory, with the associated file name in a .txt file. We send out some data and Unix has a... (1 Reply)
Discussion started by: gman
1 Replies

2. Shell Programming and Scripting

Reading text file and comparing the dates in Kshell

I have a text file in which holidays are listed as YYYYMMDD. Here is the sample data of the file. 20090911 20090912 20090913 I need to read this file and see if the current day is listed in this text file. If today and any of the rows in my text file match, I need to do further... (2 Replies)
Discussion started by: Pramodini Rode
2 Replies

3. Shell Programming and Scripting

Comparing and Formatting the text file

hi, I need a script which can format the below text file which contains comments file1.txt -------- //START //Name: some value //Date: //Changes:............. //..................... //END //START //Date: //Name: some value //Changes:............. //..................... (3 Replies)
Discussion started by: flamingo_l
3 Replies

4. UNIX for Dummies Questions & Answers

Comparing a number in a text file with a specific value

My project is to get a temperature reading from a refridgerator every 2 minutes and check to see if the door has been left open. I don't yet have the mastery of Linux, being a complete noob, but I reckon I need a text file with the latest temperature reading in it. This I've managed to do by... (2 Replies)
Discussion started by: Fitch
2 Replies

5. UNIX Desktop Questions & Answers

COMPARING COLUMNS IN A TEXT FILE

Hi, Good day. I currently have this data called database.txt and I would like to check if there are no similar values (all unique) on an entire row considering the whole column data is unique. the data is as follows cL1 cL2 cL3 cL4 a12 c13 b13 c15 b11 a15 c19 b11 c15 c17 b13 f14 with... (1 Reply)
Discussion started by: whitecross
1 Replies

6. Shell Programming and Scripting

Comparing a text file's entries with ps -ef output

Shell : Korn os : AIX This is the ps output looking for a process called pmon. pmon runs with various 'service' names which is appended with an underscore as shown below. For example a pmon process for the service hexjkm will be named ora_pmon_hexjkm $ ps -ef | grep pmon oracle... (1 Reply)
Discussion started by: kraljic
1 Replies

7. Shell Programming and Scripting

Comparing text in 2 files and output difference in another file.

I have 2 files of almost same text apart from 2,3 ending lines. Now I want to get that difference in another file. e.g file1.txt is Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_livecd-lv_root 18G 2.4G 15G 14% / tmpfs 504M ... (12 Replies)
Discussion started by: kashif.live
12 Replies

8. Shell Programming and Scripting

Comparing 2 text files & downloading a file if the last lines are different

Hello I'm having a little difficulty in writing a shell script for a few simple tasks. First I have two files "file1.txt" and "file2.txt" and I want to read and compare the last line of each file. The files look like this. File1.txt File2.txt After comparing the two lines I would... (2 Replies)
Discussion started by: RustikGaming
2 Replies

9. Shell Programming and Scripting

**URGENT ** : Comparing the pattern of the file names in 2 different directories

Hi, I have got a requirement for which i need your help. The following problem is required to get solved in PERL SCRIPT. Here is the requirement. There are 4 folders say SRC_DIR1, SRC_DIR2 and TGT_DIR_1,TGT_DIR_2 (Note: both path of SRC_DIR1 & SRC_DIR2 are different but both path of... (1 Reply)
Discussion started by: shadow_fawkes
1 Replies

10. Shell Programming and Scripting

Comparing the pattern of the file names in 2 different directories

Hi, I have got a requirement for which i need your help. The following problem is required to get solved in PERL SCRIPT. Here is the requirement. There are 4 folders say SRC_DIR1, SRC_DIR2 and TGT_DIR_1,TGT_DIR_2 (Note: both path of SRC_DIR1 & SRC_DIR2 are different but both path of... (4 Replies)
Discussion started by: shadow_fawkes
4 Replies
genSslCert(1)						      General Commands Manual						     genSslCert(1)

NAME
genSslCert - Generate SSL certificates for Small-Footprint CIM Broker (sfcb) SYNOPSIS
genSslCert DESCRIPTION
Script to generate the server.pem and client.pem SSL certificate files to enable the Small-Footprint CIM Broker to handle https requests from CIM clients. FILES
/usr/share/sfcb/genSslCert.sh The genSslCert script. /etc/sfcb/server.pem The server certificate file. /etc/sfcb/client.pem The client certificate file. PREREQUISITES
Requires OpenSSL package to be installed. AUTHOR
Adrian Schuur <schuur@de.ibm.com> BUGS
The SBLIM project maintains a mailing list to which you should direct all questions regarding sfcb, sfcc, wbemcli, or any of the SBLIM providers. To subscribe to this mailing list visit http://lists.sourceforge.net/lists/listinfo/sblim-issues The SBLIM Project Bug tracking page can be found at http://sourceforge.net/tracker/?group_id=128809&atid=712784 COPYRIGHT
(C) Copyright IBM Corp. 2004, 2005 AVAILABILITY
The Small-Footprint CIM Broker (sfcb) is a part of the SBLIM project. The most recent version is available on the web at http://sblim.sourceforge.net/ SEE ALSO
sfcbd(1) genSslCert Version 1.3.16 August 2005 genSslCert(1)
All times are GMT -4. The time now is 02:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy