<?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 with script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431610#M3277</link>
    <description>Put a backslash in front of the *. The shell is trying to interpret</description>
    <pubDate>Wed, 19 Jul 2000 14:36:05 GMT</pubDate>
    <dc:creator>Rick Garland</dc:creator>
    <dc:date>2000-07-19T14:36:05Z</dc:date>
    <item>
      <title>Help with script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431609#M3276</link>
      <description>Why am I getting this error when I run this script.    script and output error attach&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Junior</description>
      <pubDate>Wed, 19 Jul 2000 14:33:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431609#M3276</guid>
      <dc:creator>Junior C.</dc:creator>
      <dc:date>2000-07-19T14:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431610#M3277</link>
      <description>Put a backslash in front of the *. The shell is trying to interpret</description>
      <pubDate>Wed, 19 Jul 2000 14:36:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431610#M3277</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2000-07-19T14:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431611#M3278</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;could it be that whithin your subirs there are files that begin with -* ?&lt;BR /&gt;Check this with a find command.&lt;BR /&gt;If so change your ll command to:&lt;BR /&gt;ll ./$FILE&lt;BR /&gt;This will prevent interpreting the filename as an option for ll.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Andrew</description>
      <pubDate>Wed, 19 Jul 2000 15:05:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431611#M3278</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2000-07-19T15:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431612#M3279</link>
      <description>Might I suggest replacing the entire structure with:&lt;BR /&gt;&lt;BR /&gt;ll -d $RETAILRE/*/* $RETAILRE/*/data.*/* | grep -v "^d" &amp;gt;&amp;gt; $LOGFILE &lt;BR /&gt;</description>
      <pubDate>Wed, 19 Jul 2000 16:17:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431612#M3279</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2000-07-19T16:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431613#M3280</link>
      <description>What is it you are trying to do?  Perhaps that would help to figure out the best way to get this script to work.</description>
      <pubDate>Wed, 19 Jul 2000 20:10:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431613#M3280</guid>
      <dc:creator>Jeremiah Campbell</dc:creator>
      <dc:date>2000-07-19T20:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help with script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431614#M3281</link>
      <description>I would think that the problem is with the syntax of your 'for' statement.  &lt;BR /&gt;&lt;BR /&gt;The following logic (utilizing your structure, excerpted from your script - it will have to be inserted, replacing the old logic, to work properly) will do what I think you want:&lt;BR /&gt;&lt;BR /&gt;cd $RETAILRE&lt;BR /&gt;for DIR in `ll | grep ^d | awk '{print $9}'`&lt;BR /&gt;do&lt;BR /&gt;     echo $DIR &amp;gt;&amp;gt; $LOGFILE&lt;BR /&gt;     cd $DIR&lt;BR /&gt;     for FILE in `ls $DATA`&lt;BR /&gt;     do&lt;BR /&gt;           if [[ -f $FILE ]]&lt;BR /&gt;           then&lt;BR /&gt;               ll $FILE &amp;gt;&amp;gt; $LOGFILE&lt;BR /&gt;           fi&lt;BR /&gt;     done&lt;BR /&gt;     cd $RETAILRE&lt;BR /&gt;done</description>
      <pubDate>Thu, 20 Jul 2000 13:58:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431614#M3281</guid>
      <dc:creator>Douglas Nakamoto</dc:creator>
      <dc:date>2000-07-20T13:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431615#M3282</link>
      <description>Alan and Douglas are on to a winner.&lt;BR /&gt;&lt;BR /&gt;for file in *&lt;BR /&gt;&lt;BR /&gt;will work fine when there are files to match, however when there are none it will return "*" as file once.&lt;BR /&gt;This could have been explicitly tested in the original coding loop as an exception case.&lt;BR /&gt;Alternatively Alan and Douglas's suggestions are (better) alternatives.&lt;BR /&gt;&lt;BR /&gt;for file in $DATA/*; do&lt;BR /&gt;   if [ "$file" = "$DATA/*" ]; then&lt;BR /&gt;     break&lt;BR /&gt;   fi&lt;BR /&gt;   ...&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Note that the shell expands $DATA, but not * within the quotes!&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Jul 2000 18:32:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-with-script/m-p/2431615#M3282</guid>
      <dc:creator>Jeremy Dean_3</dc:creator>
      <dc:date>2000-07-27T18:32:02Z</dc:date>
    </item>
  </channel>
</rss>

