Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Need help in writing shell script Post 302848247 by VKIRUPHAKARAN on Wednesday 28th of August 2013 10:34:05 PM
Old 08-28-2013
Need help in writing shell script

Dear Team,

Below is the list of steps i need to perform manually as of now and completely new to shell scripting, could you help in writing a shell script to perform the below procedure?






1. Log in to primary DNS server
2. Check /etc/named.conf if zone is already created (grep –i 10.0.11 named.conf)
Eg: if want to add server 10.0.11.13 in to DNS
Code:
zone "11.0.10.in-addr.arpa" in {
type master;
file "db.10.0.11";
};

3. If zone is already there go to /var/named
4. Then add server entry in file db.10.0.11
EG: 13 IN PTR servername.fg.net. And modify the serial number to yyyymmdd as below highlighted.
Suppose if entry is made on 20th November enter the serial number as 20111120
Code:
root@PDNS1A101 # cat db.10.0.99
$TTL 5h
;SOA rec
99.0.10. in-addr.arpa. IN SOA PDNS1A101.fg.net. root.PDNS1A101.fg.net. ( 20090101; serial number ( you should change to 20111120)
10800; refresh every 3 hours
10800; retry every 3 hours
604800; expire after a week
86400) ; TTL of 1 day
; Name Servers
99.0.10.in-addr.arpa. IN NS PDNS1A101.fg.net.
;Pointer records for 10.0.99

11 IN PTR PSPROA167.fg.net.
12 IN PTR PSPROD055.fg.net.
5. Add entry in db.fg.net (please change serial number here also)
6. Restart dns service -- svcadm restart dns/server

Moderator's Comments:
Mod Comment edit by bakunin: we asked you (in fact several times) to use CODE-tags. What made you think we won't care if you don't? Please use them, we really man it. Thanks.

Last edited by bakunin; 08-29-2013 at 12:08 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help with writing shell script

I have the following output. I want to write a script to check for 1. waits > 0 on all rowsand Ratio > .0. if true then send email. ========================= ROLLBACK SEGMENT CONTENTION ========================= If any ratio is > .01 then more rollback segments are needed NAME ... (1 Reply)
Discussion started by: jigarlakhani
1 Replies

2. UNIX for Dummies Questions & Answers

Writing a shell Script

How to write a shell script file to read 5 numbers using a while loop. Finding the average, maximum and minumum for the numbers. Any help would be great. (1 Reply)
Discussion started by: Chin
1 Replies

3. Shell Programming and Scripting

Need help for writing shell script

Hello ALL, I am fresher in Unix . i need help to write small shell script . Please help me unix guru. I am developing the internal site in my office . the data files are generated in one directory everyday . I have to write shell script to sort those files and put it is internal site . ... (3 Replies)
Discussion started by: deepa20
3 Replies

4. AIX

Difference between writing Unix Shell script and AIX Shell Scripts

Hi, Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies

5. Shell Programming and Scripting

Writing shell script

Hi, I am a new for shell script. i need to write script using the following commands cd /usres/test # create directory mkdir temp+DATE( i need to append date ) #moving files from one directory to this directory(we need to check total files in source and taget) cd /users/sample ... (2 Replies)
Discussion started by: bmkreddy
2 Replies

6. Shell Programming and Scripting

Need help in writing the shell script

Can anyone please help me in writing a shell script that would check if a particular user(xyz) has logged in, and if yes, the audit daemon needs to be started. When the user logs off the dameon needs to shutdown , and the report needs to be e-mailed to a set of users. (12 Replies)
Discussion started by: ggayathri
12 Replies

7. UNIX and Linux Applications

Need help in writing shell script

I have written a shell script and when i ran the script,for some point of time it is asking to press enter key manually using keyboard.So i need it the enter key in shell itself. ex : in my shell script,i used the command ssh-keygen -t rsa so it asks the enter 3 times. can you please let me know... (3 Replies)
Discussion started by: lkeswar
3 Replies

8. Shell Programming and Scripting

Writing a shell script

Hi I have two files a.log and b.log . i need to append a.log and b.log so that at the end of first line in a.log i need the append the data of first line from b.log and end of the second line in a.log i need to append the data of second line from b.log and so on up to the end of the file can... (3 Replies)
Discussion started by: lalu
3 Replies

9. Shell Programming and Scripting

Need help writing shell script!

Hi, I'm very new to this, so bear with me please. I want to write a sh script (or if there's a better format please let me know) that allows me to, when I run it, print the date to a file (1.out) take 2 arguments (files a.fa and b.fa), run them with another program, outputting to 2.out, and then... (2 Replies)
Discussion started by: ShiGua
2 Replies

10. UNIX for Dummies Questions & Answers

Need help writing shell script!

Hi, I'm very new to this, so bear with me please. I want to write a sh script (or if there's a better format please let me know) that allows me to, when I run it, print the date to a file (1.out) take 2 arguments (files a.fa and b.fa), run them with another program, outputting to 2.out, and then... (4 Replies)
Discussion started by: ShiGua
4 Replies
desproxy-dns(1) 						   User Commands						   desproxy-dns(1)

NAME
desproxy-dns - DNS for dynamic connections SYNOPSIS
desproxy-dns dns_server proxy_host proxy_port OPTIONS
None DESCRIPTION
If you have direct DNS access then you don't need to do anything else. You know you have direct DNS access if you can resolve host names to IP addresses. NOTE: as desproxy-dns listens in port 53 (which is less than 1024) you may need administrator privileges to exec desproxy-dns (in fact if you are running UN*X, you actually have to run desproxy-dns as root). OK, so you have a dns server accessible now. But your computer doesn't know anything about that. You must configure your network accordingly (again, need to be root in UN*X). Edit /etc/resolv.conf and add the line "nameserver 127.0.0.1". You don't have to restart anything. Just test ping and see if it works. ENVIRONMENT
None. FILES
None. SEE ALSO
dnsproxy(1), ping(1) AUTHORS
This manual page was written by Jari Aalto <jari.aalto@cante.net>, for the Debian GNU system (but may be used by others). Released under license GPL v2 or any later version. desproxy-dns 2012-03-26 desproxy-dns(1)
All times are GMT -4. The time now is 04:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy