LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 12:56 PM   #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 12:58 PM.
 
Old 04-14-2014, 01:00 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,344

Rep: Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341Reputation: 4341
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, 02: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 02:43 PM.
 
  


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

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

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