<?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 find command with variables and * in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-with-variables-and/m-p/5207949#M464412</link>
    <description>I am trying to write a script for a backup.&lt;BR /&gt;&lt;BR /&gt;I have parsed yesterdays date in a variable, taken for the oracle database.&lt;BR /&gt;&lt;BR /&gt;I then want to do a find in a directory with that date (all my backup file name start with a date)&lt;BR /&gt;&lt;BR /&gt;20091028_online_bu_copy_TS_USERS-ioksum8q&lt;BR /&gt;20091028_online_bu_copy_TS_SYSTEM-ipksumm4&lt;BR /&gt;20091028_online_bu_copy_TS_UNDOTBS1-iqksumn7&lt;BR /&gt;20091028_online_bu_copy_TS_SYSAUX-irksumo0&lt;BR /&gt;20091028_cf&amp;amp;spfile_NASMB_c-2956975978-20091028-03&lt;BR /&gt;20091029_online_bu_copy_TS_USERS-o7kt13mq&lt;BR /&gt;20091029_online_bu_copy_TS_SYSTEM-o8kt144o&lt;BR /&gt;----------------------&lt;BR /&gt;YESTERDAY=`sqlplus -silent " / as sysdba" &amp;lt;&amp;lt; EOF&lt;BR /&gt;set pagesize 0 feedback off heading off verify off echo off&lt;BR /&gt;Select to_char(sysdate-1,'YYYYMMDD') from dual&lt;BR /&gt;Exit;&lt;BR /&gt;EOF`&lt;BR /&gt;&lt;BR /&gt;# echo $YESTERDAY&lt;BR /&gt;# 20091028&lt;BR /&gt;&lt;BR /&gt;So I am having problems trying to do a find of files in a directory with $YESTERDAY in the file name.&lt;BR /&gt;&lt;BR /&gt;find . -type f -name '*$YESTERDAY_*'&lt;BR /&gt;   - DOES NOT WORK.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 05 Nov 2009 15:49:51 GMT</pubDate>
    <dc:creator>Ratzie</dc:creator>
    <dc:date>2009-11-05T15:49:51Z</dc:date>
    <item>
      <title>find command with variables and *</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-with-variables-and/m-p/5207949#M464412</link>
      <description>I am trying to write a script for a backup.&lt;BR /&gt;&lt;BR /&gt;I have parsed yesterdays date in a variable, taken for the oracle database.&lt;BR /&gt;&lt;BR /&gt;I then want to do a find in a directory with that date (all my backup file name start with a date)&lt;BR /&gt;&lt;BR /&gt;20091028_online_bu_copy_TS_USERS-ioksum8q&lt;BR /&gt;20091028_online_bu_copy_TS_SYSTEM-ipksumm4&lt;BR /&gt;20091028_online_bu_copy_TS_UNDOTBS1-iqksumn7&lt;BR /&gt;20091028_online_bu_copy_TS_SYSAUX-irksumo0&lt;BR /&gt;20091028_cf&amp;amp;spfile_NASMB_c-2956975978-20091028-03&lt;BR /&gt;20091029_online_bu_copy_TS_USERS-o7kt13mq&lt;BR /&gt;20091029_online_bu_copy_TS_SYSTEM-o8kt144o&lt;BR /&gt;----------------------&lt;BR /&gt;YESTERDAY=`sqlplus -silent " / as sysdba" &amp;lt;&amp;lt; EOF&lt;BR /&gt;set pagesize 0 feedback off heading off verify off echo off&lt;BR /&gt;Select to_char(sysdate-1,'YYYYMMDD') from dual&lt;BR /&gt;Exit;&lt;BR /&gt;EOF`&lt;BR /&gt;&lt;BR /&gt;# echo $YESTERDAY&lt;BR /&gt;# 20091028&lt;BR /&gt;&lt;BR /&gt;So I am having problems trying to do a find of files in a directory with $YESTERDAY in the file name.&lt;BR /&gt;&lt;BR /&gt;find . -type f -name '*$YESTERDAY_*'&lt;BR /&gt;   - DOES NOT WORK.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Nov 2009 15:49:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-with-variables-and/m-p/5207949#M464412</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2009-11-05T15:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: find command with variables and *</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-with-variables-and/m-p/5207950#M464413</link>
      <description>Use " (double quotes) rather than ' (single quote).&lt;BR /&gt;&lt;BR /&gt;find . -type f -name "*$YESTERDAY_*"&lt;BR /&gt;&lt;BR /&gt;should work fine.</description>
      <pubDate>Thu, 05 Nov 2009 15:55:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-with-variables-and/m-p/5207950#M464413</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-11-05T15:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: find command with variables and *</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-with-variables-and/m-p/5207951#M464414</link>
      <description>Nope it returns all.&lt;BR /&gt;oracle@mbowodb1 NASMB&amp;gt; find . -type f -name "*$YESTERDAY_*"&lt;BR /&gt;./20091030_cf&amp;amp;spfile_NASMB_c-2956975978-20091030-02&lt;BR /&gt;./20091030_cf&amp;amp;spfile_NASMB_c-2956975978-20091030-00&lt;BR /&gt;./20091030_online_bu_copy_TS_UNDOTBS1-68kt3ngs&lt;BR /&gt;./20091030_online_bu_copy_TS_SYSAUX-69kt3nhl&lt;BR /&gt;./20091028_cf&amp;amp;spfile_NASMB_c-2956975978-20091028-03&lt;BR /&gt;./20091028_online_bu_copy_TS_SYSTEM-ipksumm4&lt;BR /&gt;./20091028_online_bu_copy_TS_UNDOTBS1-iqksumn7&lt;BR /&gt;./20091028_online_bu_copy_TS_SYSAUX-irksumo0&lt;BR /&gt;./20091030_online_bu_copy_TS_USERS-66kt3n25&lt;BR /&gt;./20091030_online_bu_copy_TS_SYSTEM-67kt3nfo&lt;BR /&gt;./20091029_cf_copy-v0kt1531.ctl&lt;BR /&gt;./20091029_cf&amp;amp;spfile_NASMB_c-2956975978-20091029-00&lt;BR /&gt;./20091029_online_bu_copy_TS_UNDOTBS1-o9kt1465&lt;BR /&gt;./20091029_online_bu_copy_TS_SYSAUX-oakt146u&lt;BR /&gt;./20091103_cf&amp;amp;spfile-AUTO_c-2956975978-20091103-01&lt;BR /&gt;./20091105_cf&amp;amp;spfile-AUTO_c-2956975978-20091105-00&lt;BR /&gt;./20091104_online_bu_copy_TS_SYSAUX-98kthi8g&lt;BR /&gt;./20091104_cf&amp;amp;spfile-AUTO_c-2956975978-20091104-02&lt;BR /&gt;./20091028_online_bu_copy_TS_USERS-ioksum8q&lt;BR /&gt;./20091104_online_bu_copy_TS_UNDOTBS1-97kthi7m&lt;BR /&gt;./20091029_online_bu_copy_TS_USERS-o7kt13mq&lt;BR /&gt;./20091029_online_bu_copy_TS_SYSTEM-o8kt144o&lt;BR /&gt;./20091103_cf_copy-pbktem96.ctl&lt;BR /&gt;./20091104_online_bu_copy_TS_SYSTEM-96kthi6j&lt;BR /&gt;./20091103_cf&amp;amp;spfile-AUTO_c-2956975978-20091103-00&lt;BR /&gt;./20091104_online_bu_copy_TS_USERS-95kthhov&lt;BR /&gt;./20091103_online_bu_copy_TS_SYSAUX-dkkted6f&lt;BR /&gt;./20091103_cf_copy-p9kteeo8.ctl</description>
      <pubDate>Thu, 05 Nov 2009 15:57:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-with-variables-and/m-p/5207951#M464414</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2009-11-05T15:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: find command with variables and *</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-with-variables-and/m-p/5207952#M464415</link>
      <description>Figured it out:&lt;BR /&gt;&lt;BR /&gt;oracle@mbowodb1 NASMB&amp;gt; find . -type f -name "*${YESTERDAY}_*"&lt;BR /&gt;./20091104_online_bu_copy_TS_SYSAUX-98kthi8g&lt;BR /&gt;./20091104_cf&amp;amp;spfile-AUTO_c-2956975978-20091104-02&lt;BR /&gt;./20091104_online_bu_copy_TS_UNDOTBS1-97kthi7m&lt;BR /&gt;./20091104_online_bu_copy_TS_SYSTEM-96kthi6j&lt;BR /&gt;./20091104_online_bu_copy_TS_USERS-95kthhov</description>
      <pubDate>Thu, 05 Nov 2009 16:06:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-with-variables-and/m-p/5207952#M464415</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2009-11-05T16:06:10Z</dc:date>
    </item>
  </channel>
</rss>

