Solved

Sed into FSTAB

Posted on 2011-03-16
4
510 Views
Last Modified: 2012-05-11
Currently, in my fstab file I have this

xxxxxxxxx.xxxxxxxx.com:/vol/cccccccccc_path/path /public/mountpoint nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=120,vers=3,timeo=600       0 0

I need to sed the following xxx5beta

after xxx_xxx_xxx so it looks like this

xxxxxxxxx.xxxxxxxx.com:/vol/cccccccccc_path/path /public/mountpoint nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=120,vers=3,timeo=600       0 0

First with a sed script that works gets the points
0
Comment
Question by:jaxstorm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35148873
sed 's#xxx_xxxxx_xxx#xxx_xxx_xxx/xxxxbeta#' /etc/fstab > fstab.new

If OK:

mv fstab.new /etc/fstab

wmp
0
 
LVL 8

Author Comment

by:jaxstorm
ID: 35148946
I need to write to /etc/fstab directly - this'll be as part of an RPM
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 35148971
sed -i 's#xxx_xxxxx_xxx#xxx_xxx_xxx/xxxxbeta#' /etc/fstab

wmp
0
 
LVL 8

Author Closing Comment

by:jaxstorm
ID: 35150114
Perfect
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question