<?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: export with grep in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903225#M839699</link>
    <description>here is the sh script I am trying to create/test ... attached too &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#export now="/orca/oracle/admin/DRX/bdump/*.trc|grep \"`date '+%b %e'`\""&lt;BR /&gt;export now="/orca/oracle/admin/DRX/bdump/*.trc|grep \"May  9\""&lt;BR /&gt;&lt;BR /&gt;echo $now&lt;BR /&gt;ls -l $now&lt;BR /&gt;if test -r '$now'&lt;BR /&gt;then&lt;BR /&gt;        echo "TRC FILE ON DEVLOAD - " &amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;#       ls -l /orca/oracle/admin/DRX/bdump/*.trc|grep "$now" &amp;gt;&amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;        ls -l /orca/oracle/admin/DRX/bdump/*.trc|grep "May  9" &amp;gt;&amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;        echo "end of report" &amp;gt;&amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;        mail -s "!!! DEVLOAD trc file is there !!!" sbadgett@pharmcomp.com &amp;lt; /home/sbadgett/data/trc-list&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 20 May 2005 13:09:15 GMT</pubDate>
    <dc:creator>Stephen Badgett</dc:creator>
    <dc:date>2005-05-20T13:09:15Z</dc:date>
    <item>
      <title>export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903220#M839694</link>
      <description>When doing a export with an imbedded “grep” I seem to lose a space within the grep command…&lt;BR /&gt;&lt;BR /&gt;here&amp;gt; export now="/orca/oracle/admin/DRX/bdump/*.trc|grep \"May  9\""&lt;BR /&gt;here&amp;gt; echo $now&lt;BR /&gt;/orca/oracle/admin/DRX/bdump/*.trc|grep "May 9"&lt;BR /&gt;&lt;BR /&gt;What do I need to do to fix this? – I get the same response on HP-UX and</description>
      <pubDate>Fri, 20 May 2005 12:01:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903220#M839694</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2005-05-20T12:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903221#M839695</link>
      <description>As far as grep goes, I use it like this:&lt;BR /&gt;&lt;BR /&gt;netstat -an | grep ":80 "&lt;BR /&gt;&lt;BR /&gt;No special characters needed.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 20 May 2005 12:17:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903221#M839695</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-05-20T12:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903222#M839696</link>
      <description>I am not sure I am following what you stated ...&lt;BR /&gt;&lt;BR /&gt;Here is the example why I use "\" ...&lt;BR /&gt;&lt;BR /&gt;$ export now=/orca/oracle/admin/DRX/bdump/*.trc|grep "May  9"&lt;BR /&gt;$ echo $now&lt;BR /&gt;/orca/oracle/admin/DRX/bdump/*.trc|grep May&lt;BR /&gt;$ export now="/orca/oracle/admin/DRX/bdump/*.trc|grep \"May               9\""&lt;BR /&gt;$ echo $now&lt;BR /&gt;/orca/oracle/admin/DRX/bdump/*.trc|grep "May 9"&lt;BR /&gt;&lt;BR /&gt;It just seems like I loose all the spaces between May and 9  -- The reason I am doing this is that the date is right justified and I need one imbedded space between the month and day if the day is lees then a 2 digit number&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;-rw-r-----  1 oracle dba  750 May  3 17:33 /orca/oracle/admin/DRX/bdump/drx_s000_29419.trc&lt;BR /&gt;-rw-r-----  1 oracle dba 1431 May 19 02:07 /orca/oracle/admin/DRX/bdump/drx_s000_32267.trc&lt;BR /&gt;I might be going at this wrong but it does seem to be something simple that is not working the way I would like.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 May 2005 12:31:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903222#M839696</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2005-05-20T12:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903223#M839697</link>
      <description>In the examples you provided it looks like&lt;BR /&gt;there *is* a space between May and 9.  What&lt;BR /&gt;exactly are you going to do with $now besides&lt;BR /&gt;echo it?  This is probably a shell quoting&lt;BR /&gt;problem, not a problem with grep itself.&lt;BR /&gt;</description>
      <pubDate>Fri, 20 May 2005 12:55:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903223#M839697</guid>
      <dc:creator>Gregory Fruth</dc:creator>
      <dc:date>2005-05-20T12:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903224#M839698</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;since you escaped the inner double quotes, the expansion eliminates the multiple whitespaces. Use single quotes without escaping them inside:&lt;BR /&gt;export now="/orca/oracle/admin/DRX/bdump/*.trc|grep 'May     9'"&lt;BR /&gt;&lt;BR /&gt;Hope this fixes it (no system to check available now)&lt;BR /&gt;Volker</description>
      <pubDate>Fri, 20 May 2005 13:08:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903224#M839698</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2005-05-20T13:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903225#M839699</link>
      <description>here is the sh script I am trying to create/test ... attached too &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#export now="/orca/oracle/admin/DRX/bdump/*.trc|grep \"`date '+%b %e'`\""&lt;BR /&gt;export now="/orca/oracle/admin/DRX/bdump/*.trc|grep \"May  9\""&lt;BR /&gt;&lt;BR /&gt;echo $now&lt;BR /&gt;ls -l $now&lt;BR /&gt;if test -r '$now'&lt;BR /&gt;then&lt;BR /&gt;        echo "TRC FILE ON DEVLOAD - " &amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;#       ls -l /orca/oracle/admin/DRX/bdump/*.trc|grep "$now" &amp;gt;&amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;        ls -l /orca/oracle/admin/DRX/bdump/*.trc|grep "May  9" &amp;gt;&amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;        echo "end of report" &amp;gt;&amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;        mail -s "!!! DEVLOAD trc file is there !!!" sbadgett@pharmcomp.com &amp;lt; /home/sbadgett/data/trc-list&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 May 2005 13:09:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903225#M839699</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2005-05-20T13:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903226#M839700</link>
      <description>I have tried ...&lt;BR /&gt;export now="/orca/oracle/admin/DRX/bdump/*.trc|grep 'May    9'"&lt;BR /&gt;&lt;BR /&gt;I still get the same results&lt;BR /&gt;</description>
      <pubDate>Fri, 20 May 2005 13:16:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903226#M839700</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2005-05-20T13:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903227#M839701</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;what is your OS and what is your shell ?&lt;BR /&gt;&lt;BR /&gt;I just verified this behavior on Linux with bash, but the environment Variable HAS stored the additional blanks! They are just not re printed, when the variable is expanded, no idea why !&lt;BR /&gt;I have used variable with blanks in content on Solaris today (!), this is why I suggested it this way, but now on Linux ....&lt;BR /&gt;&lt;BR /&gt;Check, after "now" is set to content with several Blanks with&lt;BR /&gt;&lt;BR /&gt;env | grep now&lt;BR /&gt;&lt;BR /&gt;...should show the blanks !&lt;BR /&gt;&lt;BR /&gt;Verify with&lt;BR /&gt;if [ "$now" = "your_content" ] ; then echo true; fi&lt;BR /&gt;&lt;BR /&gt;with single blanks and correct number of blanks.&lt;BR /&gt;&lt;BR /&gt;Looks like the forum does the same elimination !&lt;BR /&gt;&lt;BR /&gt;I am confused&lt;BR /&gt;Volker&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 May 2005 13:36:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903227#M839701</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2005-05-20T13:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903228#M839702</link>
      <description>Looks like you're trying to capture the full path to the trc file with a certain time stamp. Try&lt;BR /&gt;export now=`ll /orca/oracle/admin/DRX/bdump/*.trc|grep "May  9"|awk '{print $9}'`</description>
      <pubDate>Fri, 20 May 2005 13:49:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903228#M839702</guid>
      <dc:creator>Robert Salter</dc:creator>
      <dc:date>2005-05-20T13:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903229#M839703</link>
      <description>Volker Borowski  -- Yes I did see spaces -- so the test condition should work.  I was wondering why the spaces would be removed with in "     "'s.  Well as long as the test condition works I am fine</description>
      <pubDate>Fri, 20 May 2005 13:51:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903229#M839703</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2005-05-20T13:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903230#M839704</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;if the variable has the blanks,&lt;BR /&gt;try&lt;BR /&gt; ..... | grep -e "$now"&lt;BR /&gt;&lt;BR /&gt;Volker</description>
      <pubDate>Fri, 20 May 2005 14:03:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903230#M839704</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2005-05-20T14:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903231#M839705</link>
      <description>OK, and&lt;BR /&gt;&lt;BR /&gt;echo -E "$now"&lt;BR /&gt;&lt;BR /&gt;does the trick on Linux at least :-)&lt;BR /&gt;&lt;BR /&gt;Nice nut to crack &lt;BR /&gt;Volker</description>
      <pubDate>Fri, 20 May 2005 14:07:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903231#M839705</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2005-05-20T14:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903232#M839706</link>
      <description>Ok - got it to work ...&lt;BR /&gt;&lt;BR /&gt;export x="`date '+%b %e'`"&lt;BR /&gt;export now="`/bin/ls -l /orca/oracle/admin/DRX/bdump/*.trc|grep \"$x\"|cut -b 50-`"&lt;BR /&gt;&lt;BR /&gt;echo "test"&lt;BR /&gt;echo $now&lt;BR /&gt;if test -e $now&lt;BR /&gt;then&lt;BR /&gt;        echo "TRC FILE ON DEVLOAD - " &amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;        /bin/cat $now &amp;gt;&amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;        echo "end of report" &amp;gt;&amp;gt; /home/sbadgett/data/trc-list&lt;BR /&gt;        mail -s "!!! DEVLOAD trc file is there !!!" sbadgett@pharmcomp.com &amp;lt; $now&lt;BR /&gt;else&lt;BR /&gt;      echo none today&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Fri, 20 May 2005 19:42:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903232#M839706</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2005-05-20T19:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903233#M839707</link>
      <description>The final copy ...&lt;BR /&gt;&lt;BR /&gt;export x="`date '+%b %e'`"&lt;BR /&gt;export now="`/bin/ls -l /orca/oracle/admin/DRX/bdump/*.trc|grep \"$x\"|cut -b 50-`"&lt;BR /&gt;&lt;BR /&gt;if test -e $now&lt;BR /&gt;then&lt;BR /&gt;        mail -s "!!! DEVLOAD trc file is there !!!" sbadgett@pharmcomp.com &amp;lt; $now&lt;BR /&gt;else&lt;BR /&gt;      echo none today&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Fri, 20 May 2005 19:50:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903233#M839707</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2005-05-20T19:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: export with grep</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903234#M839708</link>
      <description>Thanks for all your help -- I mean ALL you help&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Stephen</description>
      <pubDate>Fri, 20 May 2005 19:51:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/export-with-grep/m-p/4903234#M839708</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2005-05-20T19:51:43Z</dc:date>
    </item>
  </channel>
</rss>

