<?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: script question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/2535667#M898655</link>
    <description>Hi Greta:&lt;BR /&gt;&lt;BR /&gt;Change:&lt;BR /&gt;&lt;BR /&gt;# echo "$PWD. [`date '+%D %T'`]" &lt;BR /&gt;&lt;BR /&gt;to:&lt;BR /&gt;&lt;BR /&gt;# echo "$PWD/$I. [`date '+%D %T'`]" &lt;BR /&gt;&lt;BR /&gt;...and you will have what you want.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Fri, 01 Jun 2001 19:58:08 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2001-06-01T19:58:08Z</dc:date>
    <item>
      <title>script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/2535666#M898654</link>
      <description>Just a quick &amp;amp; hopefully easy question:&lt;BR /&gt;I'd like to write a script to list a series of filenames followed by their contents.  This is what I have so far, but it doesn't list the filename only the directory:&lt;BR /&gt;#Create listing of the indices in the custom directory.&lt;BR /&gt;#&lt;BR /&gt;echo "=========Custom Indices Report [`date '+%D %T' `]====================="&lt;BR /&gt;  cd /usr/local/bin/indices                  &lt;BR /&gt;for I in `ls` ; do&lt;BR /&gt;  echo "$PWD. [`date '+%D %T'`]"&lt;BR /&gt;  cat $I&lt;BR /&gt;  echo "\n"&lt;BR /&gt;done&lt;BR /&gt;Thanks!</description>
      <pubDate>Fri, 01 Jun 2001 19:43:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/2535666#M898654</guid>
      <dc:creator>Greta Blamire</dc:creator>
      <dc:date>2001-06-01T19:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/2535667#M898655</link>
      <description>Hi Greta:&lt;BR /&gt;&lt;BR /&gt;Change:&lt;BR /&gt;&lt;BR /&gt;# echo "$PWD. [`date '+%D %T'`]" &lt;BR /&gt;&lt;BR /&gt;to:&lt;BR /&gt;&lt;BR /&gt;# echo "$PWD/$I. [`date '+%D %T'`]" &lt;BR /&gt;&lt;BR /&gt;...and you will have what you want.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 01 Jun 2001 19:58:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/2535667#M898655</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-06-01T19:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: script question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/2535668#M898656</link>
      <description>Hi Greta,&lt;BR /&gt;&lt;BR /&gt;You're very close. Just before the cat ${i} statement insert echo "File: ${i}".&lt;BR /&gt;&lt;BR /&gt;If there are no directories within this directory, you are ok; otherwise you should surround your echo, echo, cat, echo statements&lt;BR /&gt;with a test for regular files:&lt;BR /&gt;&lt;BR /&gt;for i in ...&lt;BR /&gt;  do&lt;BR /&gt;     if [ -r "${i}" -a -f "${i} ]&lt;BR /&gt;        then&lt;BR /&gt;           echo "Date Time"&lt;BR /&gt;           echo "Filename: ${i}"&lt;BR /&gt;           cat ${i}&lt;BR /&gt;           echo &lt;BR /&gt;        fi&lt;BR /&gt;&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;Regards, Clay&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Jun 2001 19:58:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/2535668#M898656</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-06-01T19:58:27Z</dc:date>
    </item>
  </channel>
</rss>

