<?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: Automating changes in text files in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067365#M94751</link>
    <description>sandman sorry I forgot sed don't change the input file.</description>
    <pubDate>Fri, 07 Sep 2007 01:25:33 GMT</pubDate>
    <dc:creator>unixnewbie</dc:creator>
    <dc:date>2007-09-07T01:25:33Z</dc:date>
    <item>
      <title>Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067356#M94742</link>
      <description>Hi alll,&lt;BR /&gt;&lt;BR /&gt; I am new to unix,partcularly to shell scripting.I have an appplication which generates data files which I have to edit (using vi) and search for a line starting with a particular pattern (numeric or alphanumeric eg: "003" or "abc" 0r "a13" etc....).If i find that particular line I have check whether the next line starts with another particular pattern and if it is NOT I need to combine both the lines in to one (ie, no CR or "enter") in between.I  tried with sed and some scripting but still no progress. I will be extremely happy if I get some script in which I can pass on the file name and the patterns to be searched and have the file changed (as I have a lot ).Please help .Thanks in advance&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Sep 2007 02:31:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067356#M94742</guid>
      <dc:creator>unixnewbie</dc:creator>
      <dc:date>2007-09-06T02:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067357#M94743</link>
      <description>&lt;!--!*#--&gt;It would probably be simpler to do it in awk where you can actually program.&lt;BR /&gt;awk '&lt;BR /&gt;/^003/ || /^abc/ || /^a13/ {&lt;BR /&gt;printf "%s", $0&lt;BR /&gt;getline&lt;BR /&gt;if ($0 ~ "^next" )&lt;BR /&gt;   print ""        # newline&lt;BR /&gt;}&lt;BR /&gt;{ print } ' file&lt;BR /&gt;&lt;BR /&gt;If you want the patterns to be variables:&lt;BR /&gt;awk -v p1="^003" -v p2="^abc" -v p3="^a13" -v p4="^next" '&lt;BR /&gt;$0 ~ p1 || $0 ~ p2 || $0 ~ p3 {&lt;BR /&gt;printf "%s", $0&lt;BR /&gt;getline&lt;BR /&gt;if ($0 ~ p4)&lt;BR /&gt;   print ""        # newline&lt;BR /&gt;}&lt;BR /&gt;{ print } ' file&lt;BR /&gt;&lt;BR /&gt;And since you are using EREs, you can combine the N patterns:&lt;BR /&gt;awk -v p1="^(003)|(abc)|(a13)" -v p4="^next" '&lt;BR /&gt;$0 ~ p1 {&lt;BR /&gt;printf "%s", $0&lt;BR /&gt;getline&lt;BR /&gt;if ($0 ~ p4)&lt;BR /&gt;   print ""        # newline&lt;BR /&gt;}&lt;BR /&gt;{ print } ' file</description>
      <pubDate>Thu, 06 Sep 2007 04:33:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067357#M94743</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-06T04:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067358#M94744</link>
      <description>Dear dennis,&lt;BR /&gt;&lt;BR /&gt; Thanks for that. But please clarify the following (may be too silly..)&lt;BR /&gt;1) Can I just type in all this to file and run that as a script ?&lt;BR /&gt;2) will the same work on Linux also ??&lt;BR /&gt;3) Can u suggest changes so that I can use it as a script and I can run it just by typing&lt;BR /&gt;&lt;BR /&gt; ./script &lt;FILENAME&gt; &lt;PATTERN1&gt; &lt;PATTERN2&gt;&lt;BR /&gt;&lt;BR /&gt;eg: ./scr myfile 000 003&lt;BR /&gt;&lt;BR /&gt;and all the lines in myfile starting with 000 will combine with the next line if it is NOT starting with 003.(other lines no changes)&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;/PATTERN2&gt;&lt;/PATTERN1&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Thu, 06 Sep 2007 07:22:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067358#M94744</guid>
      <dc:creator>unixnewbie</dc:creator>
      <dc:date>2007-09-06T07:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067359#M94745</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try running the attached as you have suggested; it may or may not work.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Thu, 06 Sep 2007 08:02:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067359#M94745</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2007-09-06T08:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067360#M94746</link>
      <description>&lt;!--!*#--&gt;&lt;BR /&gt;Here is a perl one-liner that works for the problem as stated&lt;BR /&gt;&lt;BR /&gt;$ perl -e '$a=shift; $b=shift; while (&amp;lt;&amp;gt;) {if (/^$a/){chomp;print;$_=&amp;lt;&amp;gt;;$_="\n".$_ if /^$b/} print}&lt;BR /&gt;' &lt;START-PATTERN&gt; &lt;END-PATTERN&gt; &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It user "^" to anchor the match pattern to the beginning of lines as specified.&lt;BR /&gt;Questions to ask yourself.&lt;BR /&gt;&lt;BR /&gt;- What to do if there are mutliple starts&lt;BR /&gt;- Glue together just one next line or everything up to the next end&lt;BR /&gt;- What to do if there is no end in sight&lt;BR /&gt;- What to do if there extra ends&lt;BR /&gt;- Can the start line ever be a last line in a file.&lt;BR /&gt;&lt;BR /&gt;Here is the perl script in slow motion:&lt;BR /&gt;&lt;BR /&gt;$ perl -e ' '  # start perl with scrip in text&lt;BR /&gt; $a=shift; # pick up start pattern from command line&lt;BR /&gt; $b=shift; # pick up stop&lt;BR /&gt; while (&amp;lt;&amp;gt;) { # loop through input file&lt;BR /&gt;  if (/^$a/) {  # looks like the trigger?&lt;BR /&gt;   {chomp; # prepare by removing new-line&lt;BR /&gt;   print;  # pritn first chunk already&lt;BR /&gt;   $_=&amp;lt;&amp;gt;;  # read next chunk&lt;BR /&gt;   $_="\n".$_ # pre-pend a new-line only...&lt;BR /&gt;   if /^$b/ # if end pattern seen&lt;BR /&gt;  }&lt;BR /&gt;  print    # print the current line&lt;BR /&gt; }  # loop&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps some,&lt;BR /&gt;Hein van den Heuvel (at gmail dot com)&lt;BR /&gt;HvdH Performance Consulting&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FILENAME&gt;&lt;/END-PATTERN&gt;&lt;/START-PATTERN&gt;</description>
      <pubDate>Thu, 06 Sep 2007 10:01:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067360#M94746</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-09-06T10:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067361#M94747</link>
      <description>Try the sed construct below:&lt;BR /&gt;&lt;BR /&gt;# sed '/^000/N;/.*\n003/s/\n/ /p' file&lt;BR /&gt;&lt;BR /&gt;~cheers</description>
      <pubDate>Thu, 06 Sep 2007 14:04:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067361#M94747</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-09-06T14:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067362#M94748</link>
      <description>To execute sed construct from within a shell script do as shown:&lt;BR /&gt;&lt;BR /&gt;# ./uxscript file 000 003&lt;BR /&gt;&lt;BR /&gt;...contents of uxscript are listed below.&lt;BR /&gt;&lt;BR /&gt;======================= uxscript =======================&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;sed "/^$2/N;/.*\n$3/!s/\n/ /p" $1</description>
      <pubDate>Thu, 06 Sep 2007 15:17:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067362#M94748</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-09-06T15:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067363#M94749</link>
      <description>&lt;!--!*#--&gt;&amp;gt;1) Can I just type in all this to file and run that as a script?&lt;BR /&gt;&lt;BR /&gt;Yes.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;2) will the same work on Linux also??&lt;BR /&gt;&lt;BR /&gt;It should.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;3) Can you suggest changes so that I can use it as a script and I can run it just by typing&lt;BR /&gt;./script &lt;FILENAME&gt; &lt;PATTERN1&gt; &lt;PATTERN2&gt;&lt;BR /&gt;eg: ./scr myfile 000 003&lt;BR /&gt;&lt;BR /&gt;Note the current script just creates a new file, if you want to update it, you would need to rename it.&lt;BR /&gt;&lt;BR /&gt;Ah, it is much easier than what I thought you needed.&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;# Usage: $0 file pat1 pat2&lt;BR /&gt;awk -v p1="^$2" -v p2="^$3" '&lt;BR /&gt;$0 ~ p1 {&lt;BR /&gt;printf "%s", $0&lt;BR /&gt;getline&lt;BR /&gt;if ($0 ~ p2)&lt;BR /&gt;   print ""        # newline&lt;BR /&gt;}&lt;BR /&gt;{ print } ' $1&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Sandman: To execute sed construct from within a shell script do as shown:&lt;BR /&gt;&lt;BR /&gt;Yes, I thought about using sed like that.  I thought I had to look for N patterns at the same time.&lt;BR /&gt;Your script inserts a blank, mine doesn't.&lt;/PATTERN2&gt;&lt;/PATTERN1&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Thu, 06 Sep 2007 16:08:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067363#M94749</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-06T16:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067364#M94750</link>
      <description>Sandman, The sed construct on execution shows the result but the file is not changing. If I redirect the o/p to another file ./sand myfile 000 003 &amp;gt; myfile1 I get what I want but the line replicates.ie, it identifies the lines, joines them perfect, but it will add one more line in myfile1   (a duplicate the same joined line).Any changes ?? ..Thanks..&lt;BR /&gt;&lt;BR /&gt;Handly, I tried ur script in Linux (#!/bin/sh)(not yet on HP)&lt;BR /&gt; ./denn newfile orgfile 000 003. &lt;BR /&gt;If I am not wrong the newfile should contain what I need.But it is still 0Kb.Please advise. Thank you&lt;BR /&gt;&lt;BR /&gt;John and Hein,I will try your suggestions and get back. Thanks a lot....&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Sep 2007 00:27:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067364#M94750</guid>
      <dc:creator>unixnewbie</dc:creator>
      <dc:date>2007-09-07T00:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067365#M94751</link>
      <description>sandman sorry I forgot sed don't change the input file.</description>
      <pubDate>Fri, 07 Sep 2007 01:25:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067365#M94751</guid>
      <dc:creator>unixnewbie</dc:creator>
      <dc:date>2007-09-07T01:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067366#M94752</link>
      <description>&amp;gt;but it will add one more line in myfile1 (a duplicate the same joined line). Any changes??&lt;BR /&gt;&lt;BR /&gt;It works fine for me.  Are you running it on Linux?  Perhaps that useless "p" needs to be removed there?&lt;BR /&gt;sed "/^$2/N;/.*\n$3/!s/\n/ /" $1&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I tried your script in Linux (#!/bin/sh)&lt;BR /&gt;./denn newfile orgfile 000 003&lt;BR /&gt;&lt;BR /&gt;Oops, you invoke it:&lt;BR /&gt;./denn orgfile 000 003 &amp;gt; newfile&lt;BR /&gt;&lt;BR /&gt;That "Usage: $0" comment was an indication that it prints: ./denn file pat1 pat2</description>
      <pubDate>Fri, 07 Sep 2007 01:38:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067366#M94752</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-07T01:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067367#M94753</link>
      <description>Dear Dennis, It was on Linux and YES (p)that solves it.Your script (forgive me for the troubles.. ) also does same thing but  the output file is a little smaller in size than the input and  in the case of  sed script both are equal in size.........???&lt;BR /&gt;Great help 4 me.. Thanks.......&lt;BR /&gt;</description>
      <pubDate>Fri, 07 Sep 2007 02:09:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067367#M94753</guid>
      <dc:creator>unixnewbie</dc:creator>
      <dc:date>2007-09-07T02:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067368#M94754</link>
      <description>&lt;!--!*#--&gt;&amp;gt;but the output file is a little smaller in size than the input and in the case of sed script both are equal in size???&lt;BR /&gt;&lt;BR /&gt;Yes, I mentioned that when I was commenting on Sandman's script:&lt;BR /&gt;   Your script inserts a blank, mine doesn't.&lt;BR /&gt;&lt;BR /&gt;If you want that blank, then use:&lt;BR /&gt;if ($0 ~ p2)&lt;BR /&gt;   print ""        # newline&lt;BR /&gt;else&lt;BR /&gt;   printf " "      # blank&lt;BR /&gt;&lt;BR /&gt;If you don't want that blank:&lt;BR /&gt;sed "/^$2/N;/.*\n$3/!s/\n//" $1</description>
      <pubDate>Fri, 07 Sep 2007 02:24:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067368#M94754</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-07T02:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067369#M94755</link>
      <description>Yes dennis. I think that finishes it.If u don't mind can u suggest me link where I can find out myself what that little sed contruct does........Thanks..&lt;BR /&gt;&lt;BR /&gt;Thank you sandman</description>
      <pubDate>Fri, 07 Sep 2007 02:35:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067369#M94755</guid>
      <dc:creator>unixnewbie</dc:creator>
      <dc:date>2007-09-07T02:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067370#M94756</link>
      <description>&amp;gt;If you don't mind can you suggest me link where I can find out myself what that little sed construct does.&lt;BR /&gt;&lt;BR /&gt;Well, you can look at sed(1):&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60130/sed.1.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60130/sed.1.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Basically what it does is:&lt;BR /&gt;sed "/^$2/N;/.*\n$3/!s/\n//" $1&lt;BR /&gt;1) Finds a line that starts with $2.&lt;BR /&gt;2) N appends the next line into the existing line with an embedded newline.&lt;BR /&gt;3) Then finds a line where it doesn't (!) have a newline followed by $3.  And if it doesn't, it substitutes (s) nothing, for that newline.&lt;BR /&gt;4) Then it writes those 2 lines out.&lt;BR /&gt;5) Other lines are just read and written.&lt;BR /&gt;&lt;BR /&gt;HP-UX used to have a hard copy manual with more details about sed.  I don't think it was ever moved to electronic form.  google did find the Tru64 version:&lt;BR /&gt;&lt;A href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PS32D-TET1_html/pst4.html#sed" target="_blank"&gt;http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PS32D-TET1_html/pst4.html#sed&lt;/A&gt;</description>
      <pubDate>Fri, 07 Sep 2007 02:52:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067370#M94756</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-07T02:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067371#M94757</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;For a 'sed' tutorial, you might find the GNU manuals helpful:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/sed/manual/sed.html" target="_blank"&gt;http://www.gnu.org/software/sed/manual/sed.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 07 Sep 2007 04:44:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067371#M94757</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-09-07T04:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067372#M94758</link>
      <description>For completeness...&lt;BR /&gt;&lt;BR /&gt;The perl solution as suggested gets a little ugly when adding a space:&lt;BR /&gt;&lt;BR /&gt;$ perl -e '$a=shift; $b=shift; while (&amp;lt;&amp;gt;) {if (/^$a/){chomp; $n=&amp;lt;&amp;gt;; $_ .= (($n =~/^$b/)? "\n" : " "&lt;BR /&gt;) . $n} print}' 100 is x.txt' &lt;START-PATTERN&gt; &lt;END-PATTERN&gt; old &amp;gt; new&lt;BR /&gt;&lt;BR /&gt;So a better perl solution would be:&lt;BR /&gt;&lt;BR /&gt;$ perl -e '$a=shift; $b=shift; while (&amp;lt;&amp;gt;) {if (/^$a/){$_ .= &amp;lt;&amp;gt;; s/\n/ / unless /\n$b/} print}' 100&lt;BR /&gt;edis x.txt&lt;BR /&gt;&lt;START-PATTERN&gt; &lt;END-PATTERN&gt; old &amp;gt; new&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The core of that in slow motion:&lt;BR /&gt;&lt;BR /&gt;if (/^$a/){    # start pattern?&lt;BR /&gt;$_ .= &amp;lt;&amp;gt;;      # add next line to current&lt;BR /&gt;s/\n/ /        # replace new-line in middle...&lt;BR /&gt;unless /\n$b/} # unless next started with end-pattern&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/END-PATTERN&gt;&lt;/START-PATTERN&gt;&lt;/END-PATTERN&gt;&lt;/START-PATTERN&gt;</description>
      <pubDate>Fri, 07 Sep 2007 06:51:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067372#M94758</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-09-07T06:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067373#M94759</link>
      <description>Under Linux the sed(1) substitution cmd takes the optional "p" switch which works if the "-n" cmd line option is given otherwise it produces a duplicate line for every one that gets sucessfully substituted. This does not happen on HP-UX and Dennis' post has explained the sed construct very well. Also checkout the sed tutorials at the "seders grab bag" :)&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://sed.sourceforge.net/grabbag/tutorials/" target="_blank"&gt;http://sed.sourceforge.net/grabbag/tutorials/&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;~cheers</description>
      <pubDate>Fri, 07 Sep 2007 12:28:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067373#M94759</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-09-07T12:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Automating changes in text files</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067374#M94760</link>
      <description>Thanks everybody</description>
      <pubDate>Thu, 13 Sep 2007 12:19:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automating-changes-in-text-files/m-p/5067374#M94760</guid>
      <dc:creator>unixnewbie</dc:creator>
      <dc:date>2007-09-13T12:19:14Z</dc:date>
    </item>
  </channel>
</rss>

