LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-09-2007, 09:44 PM   #1
cracksternation
LQ Newbie
 
Registered: Dec 2004
Location: /
Posts: 4

Rep: Reputation: 0
Bash zone files


I have this script that I wrote to make named.conf and db.domain.com files automatically here what I have so far that where the problem is
Code:
function make_dns {
cat <<- _EOF_
    `$ORIGIN` .
    `$TTL`    1d
    $dname     IN      SOA     $nameserver. $USER.$dname. (
                        2007080801      ; Serial
                                1h      ; Refresh
                                1h      ; Retry
                                1d      ; Expire
                                1h )    ; Negative Cache TTL

                IN      NS      $namesvr.
                IN      A       $IP

                IN      MX      1       mail.$dname.
                IN      MX      5       mail.$dname.
                IN      MX      5       mail.$dname.
                IN      MX      10      mail.$dname.

    `$ORIGIN` $dname.
    www             IN      A       $HOSTIP
    mail            IN      CNAME   www
    ftp        IN    CNAME    www
_EOF_
}
You see $ORIGIN an $TTL are suppose to be $ORIGIN and $TTL and Idea how to output them not as a Variable like Bash Thinks there are?
 
Old 08-09-2007, 10:05 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Use a backslash ("\") before the dollar sign to identify it as a literal.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Zone files madunix Linux - Networking 3 06-22-2006 04:31 AM
DNS Zone Files Swakoo Linux - Newbie 3 06-22-2005 04:54 AM
What are the right values for zone files. jolly Linux - General 0 05-06-2003 12:07 PM
Bind and DNS information conf files and zone files aaronluke Linux - General 1 10-13-2002 09:41 AM
Get Zone files from DNS? mig Linux - General 0 02-28-2002 03:03 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration