Sponsored Content
Full Discussion: Conf file entry.
Top Forums Shell Programming and Scripting Conf file entry. Post 302487511 by amit.mathur08 on Wednesday 12th of January 2011 04:48:12 PM
Old 01-12-2011
Conf file entry.

Hi,

Lets say I have a script which reads a conf file (say MASTERFILE) line by line to fetch file_name, source_path, dest_path. But currently, here the file name are static for eg: ABC.txt or XYZ.txt. So i have hard-coded in the conf file.
So what happens that the script picks up the file_name from source_path and put it on the dest_path. Until this point all are ok as file_name is static.

Now my issue is:

Few files I have which are generating with the timestamp in the source_path, so naturally I cannot put that in the conf file.
For eg: today a file generate as TEST1_20110113, then tomorrow as TEST1_20110114, then TEST1_20110115.
Now how I can make an entry in the conf file or how I can change my script (which cat the MASTERFILE and reads line by line takes file_name, source_path, dest_path in variable and operate on that) so that I can use static file name and dynamic file name (as shown above) also to perform certain actions.

Please note: I donot want to hardcode file_name in the script at any point of time. It should fetch file name from MASTERFILE.

Please assist.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

delete dhcp.conf entry using sed

I am trying to use sed to remove entries from my dhcpd.conf file. The form of the file is: host foo { option 1 option 2 } host bar { option 1 option 2 } I was trying to use a label like: sed -e :a -e "s/^host bar {*//g;/{/N;//ba" /etc/dhcpd.conf... (2 Replies)
Discussion started by: tizatron
2 Replies

2. IP Networking

snmptrap.conf file

Hi I tried a lot bt could not configure snmptrapd.conf... Can any one tell me the steps or give me the configured snmptrapd.conf file?? Its really important..Plz help me.. Thanx (0 Replies)
Discussion started by: swapna_me
0 Replies

3. UNIX for Advanced & Expert Users

Configuring snmpd.conf and snmptrapd.conf

HI, I want a help for Configuring snmpd.conf and snmptrapd.conf (i.e Configuring SNMP) for receiving TRAPS in my networks. I am using RHEL4.0 OS. Please tell me How I can configure above two files in a proper way and at an advanced level. Especially I am getting... (2 Replies)
Discussion started by: jagdish.machhi@
2 Replies

4. Solaris

Want to know about a entry in syslog.conf

Hi Everyone, I just wanted to know about the below entry in syslog.conf in Solaris 10: kern.notice @destserver Now the log will be redirected to destserver. But I want to know the location on the destserver where this log will be thrown. Thanks in Advance, Deepak (4 Replies)
Discussion started by: naw_deepak
4 Replies

5. Solaris

basic question on sd.conf and lpc.conf file

Hello Guys, Do we need to configure this file only if we add SAN disk or even if we add local disk, do we need to modify? (4 Replies)
Discussion started by: mokkan
4 Replies

6. UNIX for Advanced & Expert Users

How can i tell which conf file it is using

i have this program running on my solaris and there are two identical config files, i am not sure which one is being used by this program but I am sure it uses one of them. I run lsof -p {pid} but it does not show which config file has been read by this program, what i am doing wrong? thanks (4 Replies)
Discussion started by: fedora
4 Replies

7. How to Post in the The UNIX and Linux Forums

Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server

Hi All, Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries. example: Parent is : ---------- dn: email=yogesh.kumar@wipro.com, o=wipro, o=in child is: ---------- dn: cn: yogesh kumar, email=yogesh.kumar@wipro.com,... (1 Reply)
Discussion started by: Chand
1 Replies

8. Shell Programming and Scripting

Script to update rsyslog.conf and auditd.conf

Hello all, Newbie here. I'm currently tasked with updating rsyslog.conf and auditd.conf on a large set of servers. I know the exact logging configurations that I want to enable. I have updated both files on on a server and hope to use the updated files as a template for the rest of the... (3 Replies)
Discussion started by: Mide
3 Replies

9. Solaris

Configure resolv.conf and nsswitch.conf

Hi, I've installed Solaris 11.3(live media) and configured DNS. Everytime I reboot the server, resolv.conf got deleted and it created a new nsswitch.conf. I used below to configure both settings: # svccfg -s dns/client svc:/network/dns/client> setprop config/nameserver = (xx.xx.xx.aa... (1 Reply)
Discussion started by: flexihopper18
1 Replies
Xacobeo::Conf(3pm)					User Contributed Perl Documentation					Xacobeo::Conf(3pm)

NAME
Xacobeo::Conf - Application's configuration. SYNOPSIS
use Xacobeo::Conf; my $conf = Xacobeo::Conf->get_conf; my $icon = $conf->share_file('images', 'xacobeo.png'); # /usr/share/images/xacobeo.png my $po_folder = $conf->share_folder('locale'); # /usr/share/locale DESCRIPTION
Utility class that provides a way for accessing all configuration parameters that are needed at runtime.. PROPERTIES
The following properties are defined: dir The root directory where the application has been installed. METHODS
The following methods are available: get_conf Returns the current configuration instance. This class is a singleton so there's no constructor. share_dir Returns the path of a folder in the application's share directory. Parameters: o @path The path parts relative to the share directory. share_file Returns the path of a file in the application's share directory. Parameters: o @path The path parts relative to the share directory. app_name Returns the application's name. plugin_folders Returns the folders that are scanned for plugins. AUTHORS
Emmanuel Rodriguez <potyl@cpan.org>. COPYRIGHT AND LICENSE
Copyright (C) 2008,2009 by Emmanuel Rodriguez. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2011-11-16 Xacobeo::Conf(3pm)
All times are GMT -4. The time now is 01:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy