<?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 Perl Help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/3545773#M701850</link>
    <description>Dear Gurus,&lt;BR /&gt;&lt;BR /&gt;I am creating a script for data manipulation..&lt;BR /&gt;Below is the sample line.&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;export difflotid=$(grep "&lt;ED_DIFFUSION_LOTID&gt;" $EFILE | awk -F \" '{print $2}')&lt;BR /&gt;&lt;BR /&gt;This would get the value and store it to difflotid variable.&lt;BR /&gt;&lt;BR /&gt;I will be using this variable to be transfer/use in other file.&lt;BR /&gt;&lt;BR /&gt;Perl is suitable for in-line editing for me.&lt;BR /&gt;&lt;BR /&gt;I need to know the syntax (Perl) to replace the the following line below using the difflotid variable from another file.&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;Diffusion Lot ID, 11111-11&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Maximum points for all correct replies.&lt;BR /&gt;&lt;BR /&gt;&lt;/ED_DIFFUSION_LOTID&gt;</description>
    <pubDate>Mon, 16 May 2005 22:56:05 GMT</pubDate>
    <dc:creator>Pando</dc:creator>
    <dc:date>2005-05-16T22:56:05Z</dc:date>
    <item>
      <title>Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/3545773#M701850</link>
      <description>Dear Gurus,&lt;BR /&gt;&lt;BR /&gt;I am creating a script for data manipulation..&lt;BR /&gt;Below is the sample line.&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;export difflotid=$(grep "&lt;ED_DIFFUSION_LOTID&gt;" $EFILE | awk -F \" '{print $2}')&lt;BR /&gt;&lt;BR /&gt;This would get the value and store it to difflotid variable.&lt;BR /&gt;&lt;BR /&gt;I will be using this variable to be transfer/use in other file.&lt;BR /&gt;&lt;BR /&gt;Perl is suitable for in-line editing for me.&lt;BR /&gt;&lt;BR /&gt;I need to know the syntax (Perl) to replace the the following line below using the difflotid variable from another file.&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;Diffusion Lot ID, 11111-11&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Maximum points for all correct replies.&lt;BR /&gt;&lt;BR /&gt;&lt;/ED_DIFFUSION_LOTID&gt;</description>
      <pubDate>Mon, 16 May 2005 22:56:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/3545773#M701850</guid>
      <dc:creator>Pando</dc:creator>
      <dc:date>2005-05-16T22:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/3545774#M701851</link>
      <description>You can do this with a single script as,&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;export difflotid=$(grep "&lt;ED_DIFFUSION_LOTID&gt;" $EFILE | awk -F \" '{print $2}')&lt;BR /&gt;&lt;BR /&gt;..&lt;BR /&gt;&lt;BR /&gt;# It will automatically update in filename with changes&lt;BR /&gt;perl -pi -e "s/^Diffusion LotID.*/$difflotid/" &lt;FILENAME&gt;&lt;BR /&gt;..&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;/FILENAME&gt;&lt;/ED_DIFFUSION_LOTID&gt;</description>
      <pubDate>Tue, 17 May 2005 00:59:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/3545774#M701851</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-05-17T00:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/3545775#M701852</link>
      <description>The above works... but I'd use &lt;BR /&gt;&lt;BR /&gt;perl -i.org -pe "s/Diffusion Lot ID.*/$difflotid/" &lt;FILE&gt;&lt;BR /&gt;&lt;BR /&gt;This will save &lt;FILE&gt; as &lt;FILE&gt;.org &amp;amp; &lt;FILE&gt; will have the edits in it&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Tim&lt;/FILE&gt;&lt;/FILE&gt;&lt;/FILE&gt;&lt;/FILE&gt;</description>
      <pubDate>Tue, 17 May 2005 02:35:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/3545775#M701852</guid>
      <dc:creator>Tim D Fulford</dc:creator>
      <dc:date>2005-05-17T02:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/3545776#M701853</link>
      <description>You can also use sed instead of perl for this as,&lt;BR /&gt;&lt;BR /&gt;sed "s/^Diffusion LotID.*/\$difflotid/" &lt;FILENAME&gt; &amp;gt; &lt;OUTPUTFILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;IF you want to update into the same file then,&lt;BR /&gt;&lt;BR /&gt;sed -i "s/^Diffusion LotID.*/\$difflotid/" &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;/FILENAME&gt;&lt;/OUTPUTFILENAME&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Tue, 17 May 2005 07:36:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-help/m-p/3545776#M701853</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-05-17T07:36:41Z</dc:date>
    </item>
  </channel>
</rss>

