LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-14-2014, 11:56 AM   #1
nix84
Member
 
Registered: Apr 2014
Posts: 276

Rep: Reputation: Disabled
rc.inet1.conf not modifyable


I need to modify /etc/rc.d/rc.inet1.conf for wifi purposes.
It has a 600 permission and as root this command:
sed -i 's/IFNAME[4]/IFNAME[7]/' /etc/rc.d/rc.inet1.conf
which only changes the number will not modify the file.
It is an "in place" sed command which allows modification of an input file. Can someone explain why the file will not be modified? I tried modifying other lines and they won't change either.

Last edited by nix84; 04-14-2014 at 11:58 AM.
 
Old 04-14-2014, 12:00 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
Quote:
Originally Posted by nix84 View Post
sed -i 's/IFNAME[4]/IFNAME[7]/' /etc/rc.d/rc.inet1.conf
which only changes the number will not modify the file.
It is an "in place" sed command which allows modification of an input file. Can someone explain why the file will not be modified?
because you have to escape the '[' and the ']' when matching them: try
Code:
sed -i 's/IFNAME\[4\]/IFNAME[7]/' /etc/rc.d/rc.inet1.conf
 
1 members found this post helpful.
Old 04-14-2014, 01:19 PM   #3
nix84
Member
 
Registered: Apr 2014
Posts: 276

Original Poster
Rep: Reputation: Disabled
Thanx. Been having serious mental schisms over this and have tried innumerable iterations of the command, so much appreciated

Last edited by nix84; 04-14-2014 at 01:43 PM.
 
  


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
rc.inet1.conf/rc.wireless suggestion? TommyC7 Slackware 3 09-01-2012 10:09 AM
rc.wireless.conf and rc.inet1.conf for wireles cards davimint Slackware 1 07-13-2007 05:44 AM
where is rc.inet1.conf in debian? z3d0 Debian 3 09-23-2006 12:34 AM
rc.inet1 and rc.inet1.conf edafe Slackware 0 02-16-2005 09:51 AM
slack 9.1 rc.inet1.conf ? topche Slackware 4 12-28-2003 10:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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