<?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 at command in rc script with parms in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943867#M760677</link>
    <description>&lt;!--!*#--&gt;I want to have one of my rc scripts use the "at now + 5 minutes" syntax, but the problem I have is the file to be executed has a parm:&lt;BR /&gt;&lt;BR /&gt;case $1 in&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;'start')&lt;BR /&gt;    su - appuser -c "/bin/at -f /usr/bin/application start now + 5 minutes"&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;&lt;BR /&gt;This command fails with the message "bad time specification" I think because it believes the word 'start' should be the time specification. (If I take 'start' out the syntax is OK but obviously this is not what I want).&lt;BR /&gt;&lt;BR /&gt;I can make this work if I make an entirely new script that just does the "/usr/bin/application start" but I an trying to avoid that.&lt;BR /&gt;&lt;BR /&gt;I have tried a hereis document but could not get that to work in a rc script.&lt;BR /&gt;&lt;BR /&gt;Any ideas on how to make this work?&lt;BR /&gt;&lt;BR /&gt;Scott&lt;/SNIP&gt;&lt;/SNIP&gt;</description>
    <pubDate>Tue, 13 Feb 2007 12:16:02 GMT</pubDate>
    <dc:creator>Scott Lindstrom_2</dc:creator>
    <dc:date>2007-02-13T12:16:02Z</dc:date>
    <item>
      <title>at command in rc script with parms</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943867#M760677</link>
      <description>&lt;!--!*#--&gt;I want to have one of my rc scripts use the "at now + 5 minutes" syntax, but the problem I have is the file to be executed has a parm:&lt;BR /&gt;&lt;BR /&gt;case $1 in&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;'start')&lt;BR /&gt;    su - appuser -c "/bin/at -f /usr/bin/application start now + 5 minutes"&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;&lt;BR /&gt;This command fails with the message "bad time specification" I think because it believes the word 'start' should be the time specification. (If I take 'start' out the syntax is OK but obviously this is not what I want).&lt;BR /&gt;&lt;BR /&gt;I can make this work if I make an entirely new script that just does the "/usr/bin/application start" but I an trying to avoid that.&lt;BR /&gt;&lt;BR /&gt;I have tried a hereis document but could not get that to work in a rc script.&lt;BR /&gt;&lt;BR /&gt;Any ideas on how to make this work?&lt;BR /&gt;&lt;BR /&gt;Scott&lt;/SNIP&gt;&lt;/SNIP&gt;</description>
      <pubDate>Tue, 13 Feb 2007 12:16:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943867#M760677</guid>
      <dc:creator>Scott Lindstrom_2</dc:creator>
      <dc:date>2007-02-13T12:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: at command in rc script with parms</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943868#M760678</link>
      <description>Hi Scott:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I can make this work if I make an entirely new script that just does the "/usr/bin/application start" but I an trying to avoid that.&lt;BR /&gt;&lt;BR /&gt;Why?  Afterall, a wrapper script is often used to supply default arguments.  It's a minor bit of indirection for infrequent use here.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Feb 2007 12:32:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943868#M760678</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-13T12:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: at command in rc script with parms</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943869#M760679</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;you can create the temporary script on the fly, including a self-cleanup, if '/usr/bin/application' has execute rights:&lt;BR /&gt;&lt;BR /&gt;case $1 in&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;'start')&lt;BR /&gt;    echo "/usr/bin/application start&lt;BR /&gt;ret=\$?&lt;BR /&gt;rm -f /tmp/start_app$$&lt;BR /&gt;exit \$ret" &amp;gt;/tmp/start_app$$&lt;BR /&gt;    su - appuser -c "/bin/at -f /tmp/start_app$$ now + 5 minutes"&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;/SNIP&gt;&lt;/SNIP&gt;</description>
      <pubDate>Tue, 13 Feb 2007 13:03:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943869#M760679</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-02-13T13:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: at command in rc script with parms</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943870#M760680</link>
      <description>Obviously the correct way to handle it is to encode the parm in the script, and exec the real one.  Or what Peter suggests.&lt;BR /&gt;&lt;BR /&gt;Another way is to symlink multiple scripts to one and look at $0 to determine if this is "start" or what.</description>
      <pubDate>Wed, 14 Feb 2007 01:17:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943870#M760680</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-14T01:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: at command in rc script with parms</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943871#M760681</link>
      <description>Thanks everyone for their replies; I went with using a second script.&lt;BR /&gt;&lt;BR /&gt;Scott</description>
      <pubDate>Wed, 14 Feb 2007 12:29:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command-in-rc-script-with-parms/m-p/3943871#M760681</guid>
      <dc:creator>Scott Lindstrom_2</dc:creator>
      <dc:date>2007-02-14T12:29:56Z</dc:date>
    </item>
  </channel>
</rss>

