<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: replace multiple strings in fstab in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130426#M688296</link>
    <description>I do not want to do it for everychange there are more than 60 entries would be lot of manpower.&lt;BR /&gt;Is there anyway I can do it in one shot.&lt;BR /&gt;BR,&lt;BR /&gt;Kapil+</description>
    <pubDate>Thu, 18 Sep 2008 05:54:38 GMT</pubDate>
    <dc:creator>Kapil Jha</dc:creator>
    <dc:date>2008-09-18T05:54:38Z</dc:date>
    <item>
      <title>replace multiple strings in fstab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130424#M688294</link>
      <description>Hello Gurus,&lt;BR /&gt;I am very bad in scripting and I need to change 50 entries in a file from lets say&lt;BR /&gt;pqr23 to pqr23/abc&lt;BR /&gt;pqr24 to pqr24/abc&lt;BR /&gt;-----&lt;BR /&gt;pqr78 to pqr78/abc&lt;BR /&gt;&lt;BR /&gt;how can we do it....&lt;BR /&gt;BR,&lt;BR /&gt;Kapil+</description>
      <pubDate>Thu, 18 Sep 2008 05:46:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130424#M688294</guid>
      <dc:creator>Kapil Jha</dc:creator>
      <dc:date>2008-09-18T05:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: replace multiple strings in fstab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130425#M688295</link>
      <description>Shalom&lt;BR /&gt;&lt;BR /&gt;cp /etc/fstab /tmp/fstab&lt;BR /&gt;# make a backup&lt;BR /&gt;vi /tmp/fstab&lt;BR /&gt;&lt;BR /&gt;:%s/pqr78/"pqr78/abc"/g&lt;BR /&gt;&lt;BR /&gt;Repeat for other changes.&lt;BR /&gt;&lt;BR /&gt;Also sed can be used this way.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://nl.ijs.si/gnusl/tex/tunix/tips/node220.html" target="_blank"&gt;http://nl.ijs.si/gnusl/tex/tunix/tips/node220.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://student.northpark.edu/pemente/sed/sed1line.txt" target="_blank"&gt;http://student.northpark.edu/pemente/sed/sed1line.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.digitalpoint.com/showthread.php?t=24956" target="_blank"&gt;http://forums.digitalpoint.com/showthread.php?t=24956&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://lowfatlinux.com/linux-sed.html" target="_blank"&gt;http://lowfatlinux.com/linux-sed.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;A few low fat examples.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 18 Sep 2008 05:51:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130425#M688295</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2008-09-18T05:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: replace multiple strings in fstab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130426#M688296</link>
      <description>I do not want to do it for everychange there are more than 60 entries would be lot of manpower.&lt;BR /&gt;Is there anyway I can do it in one shot.&lt;BR /&gt;BR,&lt;BR /&gt;Kapil+</description>
      <pubDate>Thu, 18 Sep 2008 05:54:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130426#M688296</guid>
      <dc:creator>Kapil Jha</dc:creator>
      <dc:date>2008-09-18T05:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: replace multiple strings in fstab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130427#M688297</link>
      <description>Hey I have done most of the thing....i changes line after to the required thing ;)&lt;BR /&gt;like pqr23 abncjfh&lt;BR /&gt;so I canged&lt;BR /&gt; abncjfh to /abc abncjfh&lt;BR /&gt;&lt;BR /&gt;bad idea but it worked.&lt;BR /&gt;&lt;BR /&gt;I have one more question I need to add a word mns in line number from 31 to 35.&lt;BR /&gt;&lt;BR /&gt;How can we do that.&lt;BR /&gt;&lt;BR /&gt;BR,&lt;BR /&gt;Kapil+</description>
      <pubDate>Thu, 18 Sep 2008 06:39:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130427#M688297</guid>
      <dc:creator>Kapil Jha</dc:creator>
      <dc:date>2008-09-18T06:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: replace multiple strings in fstab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130428#M688298</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I don't know how you want to add it (at the beginning/at the end/as a new line?)&lt;BR /&gt;and my scripting experience is still at the beginning, but I think 'awk' would do what you want.&lt;BR /&gt;Check 'man awk' and search for examples here.&lt;BR /&gt;I've an example for sorting a file except the first 2 lines:&lt;BR /&gt;cat &lt;FILE&gt; |awk '{if (NR&amp;lt;=2) {print $0} else {print $0|"sort"}}' &amp;gt; &lt;NEW_FILE&gt;&lt;BR /&gt;&lt;BR /&gt;For your changing I would have used 'sed'&lt;BR /&gt;It's like:&lt;BR /&gt;sed 's/string1/string2/g' /etc/fstab &amp;gt; /etc/fstab.out&lt;BR /&gt;For the additional '/' in your string2 I believe there's something like '\/', but this you would have to search too.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Volkmar&lt;BR /&gt;&lt;/NEW_FILE&gt;&lt;/FILE&gt;</description>
      <pubDate>Thu, 18 Sep 2008 07:11:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130428#M688298</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2008-09-18T07:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: replace multiple strings in fstab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130429#M688299</link>
      <description>Thanks i did it&lt;BR /&gt;command is&lt;BR /&gt;12,15s/$/abc&lt;BR /&gt;will append abc at end of file.&lt;BR /&gt;Thans for the help,&lt;BR /&gt;&lt;BR /&gt;BR,&lt;BR /&gt;Kapil+</description>
      <pubDate>Thu, 18 Sep 2008 07:51:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-multiple-strings-in-fstab/m-p/5130429#M688299</guid>
      <dc:creator>Kapil Jha</dc:creator>
      <dc:date>2008-09-18T07:51:03Z</dc:date>
    </item>
  </channel>
</rss>

