<?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 2 sed in one in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627308#M104853</link>
    <description>if I have 2 sed statements&lt;BR /&gt;&lt;BR /&gt;sed  "s/north/south/ " input | sed  "s/east/west/" &amp;gt;output&lt;BR /&gt;&lt;BR /&gt;is there any way I can just use one sed?&lt;BR /&gt;&lt;BR /&gt;I mean, is there anything like&lt;BR /&gt;&lt;BR /&gt;sed  -e "s/north/south/ " -e  "s/east/west/" input &amp;gt;output&lt;BR /&gt;</description>
    <pubDate>Thu, 15 Sep 2005 13:48:03 GMT</pubDate>
    <dc:creator>Gemini_2</dc:creator>
    <dc:date>2005-09-15T13:48:03Z</dc:date>
    <item>
      <title>2 sed in one</title>
      <link>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627308#M104853</link>
      <description>if I have 2 sed statements&lt;BR /&gt;&lt;BR /&gt;sed  "s/north/south/ " input | sed  "s/east/west/" &amp;gt;output&lt;BR /&gt;&lt;BR /&gt;is there any way I can just use one sed?&lt;BR /&gt;&lt;BR /&gt;I mean, is there anything like&lt;BR /&gt;&lt;BR /&gt;sed  -e "s/north/south/ " -e  "s/east/west/" input &amp;gt;output&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Sep 2005 13:48:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627308#M104853</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2005-09-15T13:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: 2 sed in one</title>
      <link>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627309#M104854</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Yes, you can stack 'sed' scripts with multiple '-e' scripts.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;# echo "one\ntwo"|sed -e 's/one/ONE/' -e 's/two/TWO/'&lt;BR /&gt; &lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 15 Sep 2005 13:51:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627309#M104854</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-09-15T13:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: 2 sed in one</title>
      <link>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627310#M104855</link>
      <description>the last statement you have typed is perfectly allright as far as I can tell.. you just need to give the substitute command range as line numbers I believe as such:&lt;BR /&gt;&lt;BR /&gt;sed -e "1,\$s/north/south/ " -e "1,\$s/east/west/" input &amp;gt;output&lt;BR /&gt;&lt;BR /&gt;to get the whole file processed&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Sep 2005 13:53:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627310#M104855</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2005-09-15T13:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: 2 sed in one</title>
      <link>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627311#M104856</link>
      <description>yes it works just like you wrote&lt;BR /&gt;&lt;BR /&gt;or  you can use a file&lt;BR /&gt;&lt;BR /&gt;file contanins&lt;BR /&gt;s/north/south/&lt;BR /&gt;s/east/west&lt;BR /&gt;&lt;BR /&gt;then execute sed -f file input &amp;gt; output</description>
      <pubDate>Thu, 15 Sep 2005 13:54:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627311#M104856</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2005-09-15T13:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: 2 sed in one</title>
      <link>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627312#M104857</link>
      <description>If it gets complicated you can stack them in a file.&lt;BR /&gt;&lt;BR /&gt;$cat repl.sed&lt;BR /&gt;s/north/south/&lt;BR /&gt;s/east/west/&lt;BR /&gt;&lt;BR /&gt;sed -f repl.sed input &amp;gt; output&lt;BR /&gt;&lt;BR /&gt;I realize that this is not necessary for only two expressions, so this is just an fyi in case you need.&lt;BR /&gt;&lt;BR /&gt;I use these types in cases where I need a program to generate sed conditions for me dynamically, and then the sed needs be applied to a stream programmatically.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Sep 2005 14:07:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627312#M104857</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2005-09-15T14:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: 2 sed in one</title>
      <link>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627313#M104858</link>
      <description>yes, it worked for me now..I think that I miss one "s", that was why it didnt work.&lt;BR /&gt;&lt;BR /&gt;thanks everyone</description>
      <pubDate>Thu, 15 Sep 2005 14:35:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627313#M104858</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2005-09-15T14:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: 2 sed in one</title>
      <link>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627314#M104859</link>
      <description>Use perl easily instead of sed as,&lt;BR /&gt;&lt;BR /&gt;perl -pe 's/one/ONE/;s/two/TWO/' input &amp;gt; output&lt;BR /&gt;&lt;BR /&gt;If you want to update in the same file then,&lt;BR /&gt;&lt;BR /&gt;perl -pi -e 's/one/ONE/;s/two/TWO/' input-same&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Thu, 15 Sep 2005 22:17:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627314#M104859</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-15T22:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: 2 sed in one</title>
      <link>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627315#M104860</link>
      <description>Hi,&lt;BR /&gt;use:&lt;BR /&gt;&lt;BR /&gt;sed "s/north/south/;s/east/west/" input &amp;gt;output&lt;BR /&gt;&lt;BR /&gt;Art</description>
      <pubDate>Fri, 16 Sep 2005 03:41:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/2-sed-in-one/m-p/3627315#M104860</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2005-09-16T03:41:05Z</dc:date>
    </item>
  </channel>
</rss>

