LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-13-2009, 08:35 AM   #1
asim.mcp
LQ Newbie
 
Registered: Oct 2006
Posts: 28

Rep: Reputation: 15
zone record on remote dns server


Hi,

When i try the following command, It work fine
Quote:
echo "zone \"abc.com\" {"

output: zone "abc.com" {
but when i try to enter data in a remote file the quotation " signs around domain name does not enter, I'm try it with the following command.

Quote:
ssh root@server "echo "zone \"abc.com\" {" > filename"
cat filename

output: zone abc.com { <-- Here quotation " signs around domain name are missing.

please help.
 
Old 12-13-2009, 08:49 AM   #2
GooseYArd
Member
 
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183

Rep: Reputation: 46
Quote:
Originally Posted by asim.mcp View Post
Hi,

When i try the following command, It work fine


but when i try to enter data in a remote file the quotation " signs around domain name does not enter, I'm try it with the following command.




please help.
Here's a trick to make the quoting happen on the local side:

Quote:

echo "zone \"abc.com\" {" | ssh root@server "cat - > filename"
The bare "-" after cat tells cat to read from stdin, which is attached to stdout from your echo command.

.andy
 
1 members found this post helpful.
Old 12-13-2009, 12:04 PM   #3
asim.mcp
LQ Newbie
 
Registered: Oct 2006
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks. Its working as i wanted.
 
  


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
www cname record for external host in DNS zone file hebblethwaite Linux - Networking 2 10-22-2008 09:36 PM
DNS Zone Record: CNAME Not Working vbfischer Linux - Networking 2 10-13-2008 02:02 PM
How to setup a ww2 DNS Zone Record Webfreak Linux - Newbie 1 08-05-2008 10:15 AM
Reverse DNS: Why is the record on the datacenter DNS server instead? Swakoo Linux - Networking 2 09-20-2007 04:42 AM
problem with one dns reverse zone record rsmccain Linux - Networking 2 10-07-2006 08:17 AM

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

All times are GMT -5. The time now is 11:10 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