<?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: Korn Script. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605327#M853391</link>
    <description>Hello Chris,&lt;BR /&gt;&lt;BR /&gt;for the trouble shooting part, you may just add the statements&lt;BR /&gt;set -x&lt;BR /&gt;set -v&lt;BR /&gt;to your script.&lt;BR /&gt;Then everything will be shown before and after substitution.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch</description>
    <pubDate>Thu, 01 Nov 2001 15:48:50 GMT</pubDate>
    <dc:creator>Wodisch</dc:creator>
    <dc:date>2001-11-01T15:48:50Z</dc:date>
    <item>
      <title>Korn Script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605323#M853387</link>
      <description>The script below for some reason is not working and it is not creating the directory that I need it to create.&lt;BR /&gt;And when it starts to loop I get a running out of swap space message.  I finally kill the process and things are back to normal.  So what am I doing wrong here?&lt;BR /&gt;The goal is to untar all files from a directory and have them output the tar files into a final directory, and if the dir does not exsist then create the dir directory.&lt;BR /&gt;--------Start of Scripts----------------------&lt;BR /&gt;tarpath=/home/s1perf&lt;BR /&gt;dumppath=$tarpath/interim&lt;BR /&gt;datapath=/opt/best1/local/collect/data&lt;BR /&gt;cd $dumppath&lt;BR /&gt;chown best1adm:support $dumppath/*&lt;BR /&gt;ls -1 *-*tar &amp;gt; $tarpath/babytar&lt;BR /&gt;cat $tarpath/babytar | sort | while read server_tarfile ; do&lt;BR /&gt;print;print;print&lt;BR /&gt;  if [[ -f $server_tarfile ]] ; then&lt;BR /&gt;    finalpath="$datapath/$(print $server_tarfile | cut -f 2 -d '.')_mn"&lt;BR /&gt;    chown best1adm:support *&lt;BR /&gt;    cd $finalpath&lt;BR /&gt;    yes| tar xvf $dumppath/$server_tarfile&lt;BR /&gt;    chown best1adm:support *&lt;BR /&gt;    chmod 777 *&lt;BR /&gt;  fi&lt;BR /&gt;done&lt;BR /&gt;  if [[ -d $datapath ]] ; then&lt;BR /&gt;  mkdir -p $datapath&lt;BR /&gt;  chown best1adm:support $datapath&lt;BR /&gt;  chmod 777 best1:support $datapath&lt;BR /&gt;  fi&lt;BR /&gt;rm -r $dumppath/*&lt;BR /&gt;----------End of Script-----------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Oct 2001 23:05:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605323#M853387</guid>
      <dc:creator>Chris Tijerina_2</dc:creator>
      <dc:date>2001-10-31T23:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Korn Script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605324#M853388</link>
      <description>Hi Chris&lt;BR /&gt;&lt;BR /&gt;Try running it so;-&lt;BR /&gt;&lt;BR /&gt;ksh -x &amp;lt;scriptname&amp;gt;&lt;BR /&gt;&lt;BR /&gt;and watch where it loops.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 31 Oct 2001 23:09:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605324#M853388</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2001-10-31T23:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Korn Script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605325#M853389</link>
      <description>Hi again&lt;BR /&gt;&lt;BR /&gt;Also when using unix commands in a script always be pedantic in the path.&lt;BR /&gt;&lt;BR /&gt;ie not chown but /usr/bin/chown or /sbin/chown&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 31 Oct 2001 23:13:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605325#M853389</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2001-10-31T23:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Korn Script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605326#M853390</link>
      <description>Chris, &lt;BR /&gt;Some general suggestions - &lt;BR /&gt;&lt;BR /&gt;1. always delimint your variables in curly braces. when you say $dumppath/*, what you really mean is ${dumppath}/*. &lt;BR /&gt;&lt;BR /&gt;2. specify the command interpreter to be used on the first line of your script like so:&lt;BR /&gt;#! /usr/bin/ksh&lt;BR /&gt;I've seen scripts without this behave very strangely because they were involed from csh.&lt;BR /&gt;&lt;BR /&gt;3. just add a &lt;BR /&gt;set -x to your script and run - thst shoudl give you an indication of what is going wrong.&lt;BR /&gt;&lt;BR /&gt;good luck. &lt;BR /&gt;</description>
      <pubDate>Thu, 01 Nov 2001 03:03:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605326#M853390</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2001-11-01T03:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Korn Script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605327#M853391</link>
      <description>Hello Chris,&lt;BR /&gt;&lt;BR /&gt;for the trouble shooting part, you may just add the statements&lt;BR /&gt;set -x&lt;BR /&gt;set -v&lt;BR /&gt;to your script.&lt;BR /&gt;Then everything will be shown before and after substitution.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch</description>
      <pubDate>Thu, 01 Nov 2001 15:48:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/korn-script/m-p/2605327#M853391</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2001-11-01T15:48:50Z</dc:date>
    </item>
  </channel>
</rss>

