<?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: help on perl command in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/help-on-perl-command/m-p/3671705#M102756</link>
    <description># perl -le '$file=$ENV{FILE};@ARGV=($file);$var=(split/,/,(grep/DIFFLOTID/,&amp;lt;&amp;gt;)[0],3)[1];$var=~m/^[0-9][0-9]*[\.[0-9][0-9]*]{0,1}$/?`scrptpath/parset2xml -t $file;unlink$file:`ExePath/mv -f "$file" "$temp"`'&lt;BR /&gt;&lt;BR /&gt;untested&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
    <pubDate>Tue, 15 Nov 2005 04:14:01 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2005-11-15T04:14:01Z</dc:date>
    <item>
      <title>help on perl command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-on-perl-command/m-p/3671704#M102755</link>
      <description>dear gurus,&lt;BR /&gt;&lt;BR /&gt;I have the following line in my scripts which works fine&lt;BR /&gt;&lt;BR /&gt;export Var=$(awk -F "," '/DIFFLOTID/ {print $2}' $FILE)&lt;BR /&gt;  $perl/perl -e '$PerlVar=$ENV{Var};&lt;BR /&gt;  $PerlVar=~ m/^[0-9][0-9]*[\.[0-9][0-9]*]{0,1}$/g;&lt;BR /&gt;  if (pos($PerlVar)) {system("echo 'NUMBER'")} else {system("'$ExePath'/mv -f '$FILE' '$temp'")}'&lt;BR /&gt;  $scrptpath/parset2xml -t $FILE&lt;BR /&gt;  $ExePath/rm $FILE&lt;BR /&gt;&lt;BR /&gt;However, i would like to ask how can i improve the conditions: &lt;BR /&gt;&lt;BR /&gt;if (pos($PerlVar)) {system("echo 'NUMBER'")} else {system("'$ExePath'/mv -f '$FILE' '$temp'")}'&lt;BR /&gt;&lt;BR /&gt;that instead of echoing 'NUMBER', it would call the folloing line below.&lt;BR /&gt;&lt;BR /&gt;$scrptpath/parset2xml -t $FILE&lt;BR /&gt;$ExePath/rm $FILE&lt;BR /&gt;&lt;BR /&gt;I have tried to insert the lines to replace the echo 'NUMBER' but it fails.&lt;BR /&gt;&lt;BR /&gt;Maximum points for all correct answers!</description>
      <pubDate>Tue, 15 Nov 2005 03:51:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-on-perl-command/m-p/3671704#M102755</guid>
      <dc:creator>Pando</dc:creator>
      <dc:date>2005-11-15T03:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: help on perl command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-on-perl-command/m-p/3671705#M102756</link>
      <description># perl -le '$file=$ENV{FILE};@ARGV=($file);$var=(split/,/,(grep/DIFFLOTID/,&amp;lt;&amp;gt;)[0],3)[1];$var=~m/^[0-9][0-9]*[\.[0-9][0-9]*]{0,1}$/?`scrptpath/parset2xml -t $file;unlink$file:`ExePath/mv -f "$file" "$temp"`'&lt;BR /&gt;&lt;BR /&gt;untested&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 15 Nov 2005 04:14:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-on-perl-command/m-p/3671705#M102756</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-11-15T04:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: help on perl command</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-on-perl-command/m-p/3671706#M102757</link>
      <description>I hope you are posting this again. :). Check your prev. thread also for one liner.&lt;BR /&gt;&lt;BR /&gt;You can use as,&lt;BR /&gt;&lt;BR /&gt;if (pos($PerlVar)) {&lt;BR /&gt;  qx ' $scrptpath/parset2xml -t $FILE;$ExePath/rm $FILE'&lt;BR /&gt;} else {&lt;BR /&gt;qx '$ExePath'/mv -f '$FILE' '$temp'"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;You can use quote's as `command1;command2;...;commandn` like qx.&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Tue, 15 Nov 2005 04:39:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-on-perl-command/m-p/3671706#M102757</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-11-15T04:39:19Z</dc:date>
    </item>
  </channel>
</rss>

