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 |
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. |
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 |
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? |
What ARE the permissions for that file? (ls -l to check)
|
Isn't there a bind package available for Fedora Core?
|
sorry
-rw-r--r-- 1 1000 1000 104052 2008-03-27 22:10 lib/isc/unix/socket.c |
i didn't find any specific package for Fedora.
|
Quote:
Code:
yum install bind |
All times are GMT -5. The time now is 05:43 PM. |