Sponsored Content
Top Forums Shell Programming and Scripting Help related to Script to move files depending on config values Post 302567689 by sbpkumar7 on Monday 24th of October 2011 06:51:33 PM
Old 10-24-2011
Help related to Script to move files depending on config values

Hi All,

I am new to Unix scripting, I have requirement where I need to read the key value pair from config file.
Sample Config file:
Key(File Pattern) Value(File Directory location)
test /Users/Bkumar/Downloads/testdir
prod /Users/Bkumar/Downloads/proddir

Now I need to write a unix script(bash)
1) To read the key value pairs
2) After fetching key value pair , we need to search in the source(ex Source Dir) directory if there are any matches to the key, if yes then we need move the files to destination directory(present in value Ex testdir ) .

If any one have done this kind of script please do the needful.

Thanks,
Bhanu
 

8 More Discussions You Might Find Interesting

1. Programming

kernel values related to mmap

Hi there... I am maitaining an archaic application which is using mmap for file transfering/routing. There are over 500 instances of the application running without any issues for almost 2 decade. Now, the problem is that the on one particular server (HP-UX 11), sometimes the mmap is failing... (4 Replies)
Discussion started by: tobsinte
4 Replies

2. Shell Programming and Scripting

Script to compare all the config files in a cluster of servers.

Hello Lads! Climbing the shell scripting learning curve, i am faced with yet another obstacle! Here's the challenge in front of me : 1) I have 15 servers in a cluster,all of them have the same config files by name : /home/apps/xrm/App_B.cfg 2) The developers change the entries in the... (5 Replies)
Discussion started by: rdlover
5 Replies

3. Shell Programming and Scripting

Remove matched values and their related groups

For each value in file1 it has to check in file2 and file3. If value matched it has to delete that value and related group value in file2 and file3. In this example it takes A , deletes A and take related group value 1 and deletes E-1,then checks in file3 and deletes K-1.After that it takes D... (7 Replies)
Discussion started by: kanagaraj
7 Replies

4. Shell Programming and Scripting

parsing config file to create new config files

Hi, I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below. I will be using the config file as mentioned below: (config.txt) country:a,b city:1,2 type:b1... (1 Reply)
Discussion started by: clazzic
1 Replies

5. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated. script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made. OS :Susi linux ver 10.3. ... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

6. Shell Programming and Scripting

Help - Script to move files to subdir depending on file extension.

Hi, First off I'm pretty new to scripting so please be gentle. I am looking for some help with a script that will move all files with a certain extension into a folder within their current location. Just for clarity I have all my photos organised in directories such as: ... (4 Replies)
Discussion started by: guinch
4 Replies

7. Shell Programming and Scripting

Query the table and return values to shell script and search result values from another files.

Hi, I need a shell script, which would search the result values from another files. 1)execute " select column1 from table_name" query on the table. 2)Based on the result, need to be grep from .wft files. could please explain about this.Below is the way i am using. #!/bin/sh... (4 Replies)
Discussion started by: Rami Reddy
4 Replies

8. Shell Programming and Scripting

How to find the X highest values in a list depending on the values of another list with bash/awk?

Hi everyone, This is an exemple of inpout.txt file (a "," delimited text file which can be open as csv file): ID, Code, Value, Store SP|01, AABBCDE, 15, 3 SP|01, AABBCDE, 14, 2 SP|01, AABBCDF, 13, 2 SP|01, AABBCDE, 16, 3 SP|02, AABBCED, 15, 2 SP|01, AABBCDF, 12, 3 SP|01, AABBCDD,... (1 Reply)
Discussion started by: jeremy589
1 Replies
DNSSEC-REVOKE(8)						       BIND9							  DNSSEC-REVOKE(8)

NAME
dnssec-revoke - Set the REVOKED bit on a DNSSEC key SYNOPSIS
dnssec-revoke [-hr] [-v level] [-K directory] [-E engine] [-f] [-R] {keyfile} DESCRIPTION
dnssec-revoke reads a DNSSEC key file, sets the REVOKED bit on the key as defined in RFC 5011, and creates a new pair of key files containing the now-revoked key. OPTIONS
-h Emit usage message and exit. -K directory Sets the directory in which the key files are to reside. -r After writing the new keyset files remove the original keyset files. -v level Sets the debugging level. -E engine Use the given OpenSSL engine. When compiled with PKCS#11 support it defaults to pkcs11; the empty name resets it to no engine. -f Force overwrite: Causes dnssec-revoke to write the new key pair even if a file already exists matching the algorithm and key ID of the revoked key. -R Print the key tag of the key with the REVOKE bit set but do not revoke the key. SEE ALSO
dnssec-keygen(8), BIND 9 Administrator Reference Manual, RFC 5011. AUTHOR
Internet Systems Consortium COPYRIGHT
Copyright (C) 2009, 2011 Internet Systems Consortium, Inc. ("ISC") BIND9 June 1, 2009 DNSSEC-REVOKE(8)
All times are GMT -4. The time now is 01:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy