<?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: sed command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810480#M84162</link>
    <description>Removing the lines is easier with grep&lt;BR /&gt;&lt;BR /&gt;grep -v "500$" &lt;FILE&gt;&lt;BR /&gt;&lt;BR /&gt;Should take care of that.&lt;/FILE&gt;</description>
    <pubDate>Fri, 20 Sep 2002 13:32:11 GMT</pubDate>
    <dc:creator>Chris Wilshaw</dc:creator>
    <dc:date>2002-09-20T13:32:11Z</dc:date>
    <item>
      <title>sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810479#M84161</link>
      <description>HI,&lt;BR /&gt;&lt;BR /&gt;using the sed command, how can I:&lt;BR /&gt;&lt;BR /&gt;a. remove the entries ending in 500&lt;BR /&gt;&lt;BR /&gt;b. print the contents of the file with the last name and first names reversed.&lt;BR /&gt;&lt;BR /&gt;Here is the file and you time and help is grealty appreciated. &lt;BR /&gt;&lt;BR /&gt;Betty Boop:245-836-8357:635 Cutesy Lane, Hollywood, CA 91464:6/23/23:14500&lt;BR /&gt;Paco Gutierrez:835-365-1284:454 Easy Street, Decatur, IL 75732:2/28/53:123500&lt;BR /&gt;Sir Lancelot:837-835-8257:474 Camelot Boulevard, Bath, WY 28356:5/13/69:24500&lt;BR /&gt;Zippy Pinhead:834-823-8319:2356 Bizarro Ave., Farmount, IL 84357:1/1/67:89500.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Sep 2002 13:13:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810479#M84161</guid>
      <dc:creator>Anwar D Singh</dc:creator>
      <dc:date>2002-09-20T13:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810480#M84162</link>
      <description>Removing the lines is easier with grep&lt;BR /&gt;&lt;BR /&gt;grep -v "500$" &lt;FILE&gt;&lt;BR /&gt;&lt;BR /&gt;Should take care of that.&lt;/FILE&gt;</description>
      <pubDate>Fri, 20 Sep 2002 13:32:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810480#M84162</guid>
      <dc:creator>Chris Wilshaw</dc:creator>
      <dc:date>2002-09-20T13:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810481#M84163</link>
      <description>Hi Anwar,&lt;BR /&gt;&lt;BR /&gt;a) sed '/500$/d' filename&lt;BR /&gt;b) sed 's/^\([^ ]*\) \([^:]*\)/\2 \1/' filename&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin</description>
      <pubDate>Fri, 20 Sep 2002 13:40:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810481#M84163</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-09-20T13:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810482#M84164</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# sed -e '/500$/'d filename&lt;BR /&gt;&lt;BR /&gt;# awk -F: '{split($1,a," ");$1=a[2]" "a[1];print $0}'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 20 Sep 2002 13:50:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810482#M84164</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-20T13:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810483#M84165</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;OOps, forgot the input file!&lt;BR /&gt;&lt;BR /&gt;awk -F: '{split($1,a," ");$1=a[2]" "a[1];print $0}' filename&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 20 Sep 2002 13:51:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810483#M84165</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-20T13:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810484#M84166</link>
      <description>Anwar,&lt;BR /&gt;&lt;BR /&gt;Are there any middle initials in the names, suffixes, hypenated names, ... ??&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Fri, 20 Sep 2002 13:55:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810484#M84166</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-09-20T13:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810485#M84167</link>
      <description>Hi&lt;BR /&gt;In general, awk is a better tool for formatted files (and sed is better for plain text).&lt;BR /&gt;&lt;BR /&gt;example:&lt;BR /&gt;&lt;BR /&gt;BEGIN { FS = ":" }&lt;BR /&gt;function abc(a)&lt;BR /&gt;{&lt;BR /&gt;n=match(a," ")&lt;BR /&gt;return n&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;{ print  substr($1,abc($1)+1)" "substr($1,0,abc($1))" "$2 $3 $4 }&lt;BR /&gt;&lt;BR /&gt;call this file test.awk and run&lt;BR /&gt;awk -f test.awk &lt;DATAFILE&gt;&lt;BR /&gt;&lt;BR /&gt;I don't understand "entries ending with 500", all lines ends with 500.&lt;/DATAFILE&gt;</description>
      <pubDate>Fri, 20 Sep 2002 14:02:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sed-command/m-p/2810485#M84167</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2002-09-20T14:02:14Z</dc:date>
    </item>
  </channel>
</rss>

