<?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: About the shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110488#M148702</link>
    <description>#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;FILE=`basename $1 .cdr"&lt;BR /&gt;compile $1&lt;BR /&gt;mv /tmp/$FILE.cbt /usr&lt;BR /&gt;&lt;BR /&gt;This assumes you start the script with something like&lt;BR /&gt; &lt;BR /&gt;myscript myfile.cdir&lt;BR /&gt; &lt;BR /&gt;Also, the "compile" bit is where you do your compile with whatever command you use.</description>
    <pubDate>Wed, 05 Nov 2003 01:16:43 GMT</pubDate>
    <dc:creator>Mark Grant</dc:creator>
    <dc:date>2003-11-05T01:16:43Z</dc:date>
    <item>
      <title>About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110487#M148701</link>
      <description>Sorry to post a new question again there, but I really want a solution .&lt;BR /&gt;&lt;BR /&gt;I have a script which can compile a file ( eg. file1.cdr ) , the compiled file is .cbt extension ( eg. file1.cbt ) , how can I mv the  compiled file (file1.cbt not file.cdr.cbt ) to the other path ( from /tmp to /usr) ? thx.&lt;BR /&gt;&lt;BR /&gt;$pwd&lt;BR /&gt;/tmp&lt;BR /&gt;$my_script file1.cdr&lt;BR /&gt;$pwd&lt;BR /&gt;/usr&lt;BR /&gt;$file1.cbt</description>
      <pubDate>Wed, 05 Nov 2003 01:12:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110487#M148701</guid>
      <dc:creator>juno2</dc:creator>
      <dc:date>2003-11-05T01:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110488#M148702</link>
      <description>#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;FILE=`basename $1 .cdr"&lt;BR /&gt;compile $1&lt;BR /&gt;mv /tmp/$FILE.cbt /usr&lt;BR /&gt;&lt;BR /&gt;This assumes you start the script with something like&lt;BR /&gt; &lt;BR /&gt;myscript myfile.cdir&lt;BR /&gt; &lt;BR /&gt;Also, the "compile" bit is where you do your compile with whatever command you use.</description>
      <pubDate>Wed, 05 Nov 2003 01:16:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110488#M148702</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-11-05T01:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110489#M148703</link>
      <description>It is great , thx much for help.</description>
      <pubDate>Wed, 05 Nov 2003 01:38:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110489#M148703</guid>
      <dc:creator>juno2</dc:creator>
      <dc:date>2003-11-05T01:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110490#M148704</link>
      <description>thx reply , &lt;BR /&gt;&lt;BR /&gt;but I still have a problem , I don't know why even the program can't be compiled ( some compile error gerenated ), it still report the result is "0" , so it is not work to use the error checking function " if [ $? -eq 0 ] then .. "  , could suggest is there other method to make sure the file will be copy only when the compilation is successful ? thx.</description>
      <pubDate>Wed, 05 Nov 2003 02:15:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110490#M148704</guid>
      <dc:creator>juno2</dc:creator>
      <dc:date>2003-11-05T02:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110491#M148705</link>
      <description>juno2&lt;BR /&gt; &lt;BR /&gt;You'll have to find out in the script, the same way as you do yourself.  If the compile produced an error somewhere you'll have to look for it. As an example, suppose the compile writes lots of stuff to the screen and then "ERROR, it didn't work too well" if there is a failure.  You would do something like this&lt;BR /&gt; &lt;BR /&gt;your_compile_command &amp;gt; /tmp/compile.log&lt;BR /&gt;grep ERROR /tmp/compile.log &amp;gt; /dev/null || {&lt;BR /&gt; your_copy_commands here&lt;BR /&gt; exit&lt;BR /&gt;}&lt;BR /&gt;echo "Couldn't copy because the compile broke again"</description>
      <pubDate>Wed, 05 Nov 2003 02:30:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110491#M148705</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-11-05T02:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110492#M148706</link>
      <description>thx Mark reply, however,&lt;BR /&gt;&lt;BR /&gt;the system will not generate the word "ERROR" , it will generate different words , not exactly the same , do you have other idea ? thx.</description>
      <pubDate>Wed, 05 Nov 2003 21:29:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110492#M148706</guid>
      <dc:creator>juno2</dc:creator>
      <dc:date>2003-11-05T21:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110493#M148707</link>
      <description>juno2,&lt;BR /&gt; &lt;BR /&gt;You could try it the other way around.  If it produces no output if it is successful then you you could test for success (nothing in the log) instead of failure (something in the log).  Otherwise, I don't think there is much you are going to be able to do.</description>
      <pubDate>Thu, 06 Nov 2003 00:03:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3110493#M148707</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-11-06T00:03:29Z</dc:date>
    </item>
  </channel>
</rss>

