Visit Our UNIX and Linux User Community

Shell script to update zone file

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script to update zone file
# 1  
Old 08-22-2013
Shell script to update zone file

Hi folks,

I have zone files at below path i want to modify their name i don't know how to do it, Can some can suggest some kind line technique. I give you detail

I have domain host at ip address and 50 plus domain are there /var/named/*.db. If i want to change to
If i have ip address to
Please suggest.

Last edited by learnbash; 08-22-2013 at 05:32 PM.. Reason: further addition of detail

Previous Thread | Next Thread
Test Your Knowledge in Computers #911
Difficulty: Easy
In C, we can get the address of a variable as follows: pointer = &variable;
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Update config file using shell script in Solaris 5.10

hi I need to update the value in config.txt value using shell script example: lets say a value in config.txt file is as SEQUENCE=1 after some iteration as the loop ends , the SEQUENCE should get update in the config.txt file with a new value of SEQUENCE=2. also , can anyone please help me... (7 Replies)
Discussion started by: ravidwivedi2288
7 Replies

2. Shell Programming and Scripting

Shell script to read from a file and update remote server

Its a tough one and would appreciate any guidance for a script that i am trying to develop....Again I do understand its a complicated script and help would be greatly appreciated.... Thank you 1- Need to check for a file (in a certain location on a server) every 15 minute or so if it is there... (4 Replies)
Discussion started by: aavam
4 Replies

3. Shell Programming and Scripting

How to update an entry of another file in a Shell script?

Hi all, Say I have a shell script called - in this script I want to perform a task to update a specified entry of another file (e.g. users.passpords) #!/bin/bash -e PW_FILE_DIR="${A_DIR}/.../..." PW_FILE="users.passwords" I want to update the... (2 Replies)
Discussion started by: isaacniu
2 Replies

4. UNIX for Dummies Questions & Answers

How to Update DB table from txt file using CRONJOB in Unix Shell Script

Hi Experts, can guide how we can Update a Database Table using a txt file source Using Unix Shell Scripts. What are the Cron Jobs codes can written to Update DB table. txt file contains record like data. US 09/03/2012 User DocType DocID. these above feilds in txt files need to be updated in... (4 Replies)
Discussion started by:
4 Replies

5. Solaris

Update java version in Zone

I am using a solaris zone in Sun blade-T6320 which has a java version "1.5.0_18" i want to update it to or higher , how can i do that , does i need to add the new java package to the global server or just instal it in the zone itself. do i need to remove the older version or and install... (1 Reply)
Discussion started by: Sojourner
1 Replies

6. Solaris

Update single zone in alternate boot environment.

I 'm having a weired situation my system has 8 zones, running fine on solaris x86_u4. I installed the live upgrade bundle patch and did a live upgrade. The new BE was created but it missed one of the zone and now if i mount the new BE i do not see that zone in the environment so my question is how... (3 Replies)
Discussion started by: fugitive
3 Replies

7. UNIX for Dummies Questions & Answers

update records in a file using shell script...

Hi, I have a file with 6 columns. First 3 columns together make unique record. I have a variable ($v) which hold a value that is obtained by a caliculaion. I have to replace value in 5th columnn with the value of the variable ($v). The value $v is caliculated from col4 and col6 values. ... (2 Replies)
Discussion started by: new_learner
2 Replies

8. Shell Programming and Scripting

update file contents using shell script

Hi, I am having a file which contains as below Names(aaaa ,bbbb ,cccc ,dddd) now i want the file to be updated with new value 'eeee' as below Names(aaaa ,bbbb ,cccc ,dddd ,eeee) Is there a way to script this ? Thanks, (5 Replies)
Discussion started by: drams
5 Replies

9. Shell Programming and Scripting

Help shell script to loop through files update ctl file to be sql loaded

I am currently trying to find a way to loop through files in a given directory and for each file modify a ctl file and sql load it. I have been using the sed command to change the infile, badfile parameters of the control file. I have not yet tried to sql load it. Requirement: files are ftp to... (1 Reply)
Discussion started by: dba_nh
1 Replies

10. Solaris

Bind zone transfer recategorises zone file?

Hi, I have a primary/slave Bind 9 setup running on a Solaris 10 platform. Everything is hunky dorey, except for when I make a zone file change and up the serial the file that is transferred to the slave looses all its comments, and the entries are place in alphabetical order. I administer many... (1 Reply)
Discussion started by: fulhamfcboy
1 Replies
DateTime::TimeZone::Local::Unix(3)			User Contributed Perl Documentation			DateTime::TimeZone::Local::Unix(3)

DateTime::TimeZone::Local::Unix - Determine the local system's time zone on Unix VERSION
version 1.63 SYNOPSIS
my $tz = DateTime::TimeZone->new( name => 'local' ); my $tz = DateTime::TimeZone::Local->TimeZone(); DESCRIPTION
This module provides methods for determining the local time zone on a Unix platform. HOW THE TIME ZONE IS DETERMINED
This class tries the following methods of determining the local time zone: o $ENV{TZ} It checks $ENV{TZ} for a valid time zone name. o /etc/localtime If this file is a symlink to an Olson database time zone file (usually in /usr/share/zoneinfo) then it uses the target file's path name to determine the time zone name. For example, if the path is /usr/share/zoneinfo/America/Chicago, the time zone is "America/Chicago". Some systems just copy the relevant file to /etc/localtime instead of making a symlink. In this case, we look in /usr/share/zoneinfo for a file that has the same size and content as /etc/localtime to determine the local time zone. o /etc/timezone If this file exists, it is read and its contents are used as a time zone name. o /etc/TIMEZONE If this file exists, it is opened and we look for a line starting like "TZ = ...". If this is found, it should indicate a time zone name. o /etc/sysconfig/clock If this file exists, it is opened and we look for a line starting like "TIMEZONE = ..." or "ZONE = ...". If this is found, it should indicate a time zone name. o /etc/default/init If this file exists, it is opened and we look for a line starting like "TZ=...". If this is found, it should indicate a time zone name. AUTHOR
This software is copyright (c) 2013 by Dave Rolsky. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.18.2 2013-10-28 DateTime::TimeZone::Local::Unix(3)

Featured Tech Videos