LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2008, 09:15 AM   #1
Morrighan
LQ Newbie
 
Registered: Jun 2008
Posts: 8

Rep: Reputation: 0
sed command error - what am i doing wrong?


hi

im pretty new to linux.
im trying to install BIND 9.5 on Fedora 8. Im using a tutorial to install it, but when i try to build it, it doesn't work.

Build:

cd bind-9.5.0
sed -i -e '247a #undef SO_BSDCOMPAT
'lib/isc/unix/socket.c &&
./configure --prefix=/usr --sysconfdir=/etc
--enable-threads --with-libtool &&
make

either is says: 'extra characters after command' or 'no input file'

can anyone help me?

this is the link of the tutorial: http://news.softpedia.com/news/BIND-...de-36875.shtml
 
Old 06-15-2008, 09:25 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
It looks to me that the line got split due to the column formatting.

Change the sed line to:
sed -i -e '247a\
#undef SO_BSDCOMPAT' lib/isc/unix/socket.c &&

It appends the line given after line 247.
 
Old 06-15-2008, 09:26 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
The sed syntax is:
sed '247a stuff' filename
this means append a line containing "stuff" after line 247 of "filename". In your example, the closing single quote and the filename is on the next line. (not good)

(Sloppy of them to print the procedure in this way.)

If you really must enter commands on multiple lines, you have to "escape" the newline thusly:

sed '247a stuff'\
filename


But don't do this:
sed '247a stuff\
' filename


Bad--really confusing
 
Old 06-15-2008, 09:39 AM   #4
Morrighan
LQ Newbie
 
Registered: Jun 2008
Posts: 8

Original Poster
Rep: Reputation: 0
thanks for the quick reply.

I modified the command like you both suggested.

it works but now it gives a new error.

it says lib/isc/unix/socket.c: permission denied, even though im logged in as root.

how is that possible?

Last edited by Morrighan; 06-15-2008 at 09:43 AM.
 
Old 06-15-2008, 10:08 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
What ARE the permissions for that file? (ls -l to check)
 
Old 06-15-2008, 10:19 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Isn't there a bind package available for Fedora Core?
 
Old 06-15-2008, 10:33 AM   #7
Morrighan
LQ Newbie
 
Registered: Jun 2008
Posts: 8

Original Poster
Rep: Reputation: 0
sorry

-rw-r--r-- 1 1000 1000 104052 2008-03-27 22:10 lib/isc/unix/socket.c
 
Old 06-15-2008, 10:47 AM   #8
Morrighan
LQ Newbie
 
Registered: Jun 2008
Posts: 8

Original Poster
Rep: Reputation: 0
i didn't find any specific package for Fedora.
 
Old 06-15-2008, 11:12 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Quote:
Originally Posted by Morrighan View Post
i didn't find any specific package for Fedora.
bind-9.5.0 is in the official distribution of Fedora 8. How did you tried to install? The Add/Remove Software tool should have found it. Or from the command line
Code:
yum install bind
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SED command sachinh Linux - General 4 06-30-2007 02:40 PM
'sed: command garbled:' error on Solaris fatjack Solaris / OpenSolaris 3 08-25-2006 05:15 PM
sed error message:extra characters after the command wmh830621 Programming 4 08-14-2006 07:13 PM
sed error message: extra characters after the command. nano_mag Linux - General 3 05-15-2005 01:00 AM
sed command linuxdev Linux - Newbie 9 02-24-2004 04:50 PM


All times are GMT -5. The time now is 08:21 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration