<?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: How to auto start a script which required csh enviroment in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478325#M17822</link>
    <description>Good point, Sandor !!</description>
    <pubDate>Wed, 03 Jan 2001 17:19:20 GMT</pubDate>
    <dc:creator>Dan Hetzel</dc:creator>
    <dc:date>2001-01-03T17:19:20Z</dc:date>
    <item>
      <title>How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478321#M17818</link>
      <description>I have a bourne shell script which is required to be executed in csh.Now, I need to run this script every time when system boot up.I want to embed following command in my start script(/sbin/init.d/..)" su - username -c "csh -c scriptname" &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 " .I am not sure if it is good solution.I would appreciate it very much if you can give me some suggestion.&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Wed, 03 Jan 2001 15:41:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478321#M17818</guid>
      <dc:creator>Ervin Liu</dc:creator>
      <dc:date>2001-01-03T15:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478322#M17819</link>
      <description>TO force execution of csh include in the first line of your script:&lt;BR /&gt;#!/usr/bin/csh</description>
      <pubDate>Wed, 03 Jan 2001 15:47:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478322#M17819</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2001-01-03T15:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478323#M17820</link>
      <description>Hi Ervin,&lt;BR /&gt;&lt;BR /&gt;Scripts in /sbin/init.d (or /sbin/rc?.d) will execute independently of their respective shells.&lt;BR /&gt;Simply make sure that the first line of your script reads:&lt;BR /&gt;#!/usr/bin/csh&lt;BR /&gt;if you want a csh to interpret the script.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Dan&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Jan 2001 16:10:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478323#M17820</guid>
      <dc:creator>Dan Hetzel</dc:creator>
      <dc:date>2001-01-03T16:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478324#M17821</link>
      <description>Hi !&lt;BR /&gt;&lt;BR /&gt;What  You wrote it is correct if Your script's first line is good. But You can run it only when mounted /usr filesystem where You find csh. Don't forget it !&lt;BR /&gt;&lt;BR /&gt;regards,  Saa.</description>
      <pubDate>Wed, 03 Jan 2001 16:57:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478324#M17821</guid>
      <dc:creator>Sandor Horvath_2</dc:creator>
      <dc:date>2001-01-03T16:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478325#M17822</link>
      <description>Good point, Sandor !!</description>
      <pubDate>Wed, 03 Jan 2001 17:19:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478325#M17822</guid>
      <dc:creator>Dan Hetzel</dc:creator>
      <dc:date>2001-01-03T17:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478326#M17823</link>
      <description>Carlos and dan&lt;BR /&gt;  Thank you for you suggestion.Do you mean in my start script,let's say /sbin/init.d/my_startscript,I put the first line to &lt;BR /&gt;#!/usr/bin/csh.? &lt;BR /&gt;I think it should be good solution.But I still want to confirm it.so let me explain the complete case.&lt;BR /&gt;The user is called "user1",his default login shell is "/usr/bin/sh".He configured some customrized parameter in /home/user1/.cshrc. Every time when he try to run his bourne shell script "user1_script",he do "csh;user_script".I think the reason that he run "csh" command is that he want to execute /home/user1/.cshrc.I read the user_script,I did not see any relation between user_script and .cshrc.I don't know why user must run csh first,then start his user_script.Anyway,I just want my auto_start script match his procedure.&lt;BR /&gt;So do you think that I put the #!/usr/bin/csh in the first line of my start script,which can execute .cshrc and match this user's procedure?&lt;BR /&gt; thanks again&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Jan 2001 17:23:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478326#M17823</guid>
      <dc:creator>Ervin Liu</dc:creator>
      <dc:date>2001-01-03T17:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478327#M17824</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Yes, the #!/usr/bin/csh line will cause the rest of the script to be executed by the c shell.&lt;BR /&gt;&lt;BR /&gt;Make sure the #! are the absolute first two characters of the file - no indentation or blank lines above.  Otherwise, the line will just be a comment and the script will most likely run under the POSIX shell.&lt;BR /&gt;&lt;BR /&gt;--Bruce</description>
      <pubDate>Wed, 03 Jan 2001 17:46:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478327#M17824</guid>
      <dc:creator>Bruce Regittko_1</dc:creator>
      <dc:date>2001-01-03T17:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478328#M17825</link>
      <description>Hi Ervin,&lt;BR /&gt;&lt;BR /&gt;That's it! If your script starts with the following line (without any indentation or space before):&lt;BR /&gt;#!/usr/bin/csh&lt;BR /&gt;and that, at that time, /usr is mounted, C-shell will be used to interpret the script.&lt;BR /&gt;&lt;BR /&gt;Nevertheless, the file /home/user1/.cshrc won't be run because there is no relation with scripts in /sbin/rc?.d or /sbin/init.d and a user directory.&lt;BR /&gt;&lt;BR /&gt;You can explicitely force that file to be read by putting this line in the script (i.e. as second line):&lt;BR /&gt;source /home/user1/.cshrc&lt;BR /&gt;&lt;BR /&gt;Make sure that the /home/user1/.cshrc doesn't use any terminal related command (like echo, tset...) as there won't be any terminal attached to the process at run time.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Dan&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jan 2001 06:35:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478328#M17825</guid>
      <dc:creator>Dan Hetzel</dc:creator>
      <dc:date>2001-01-04T06:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478329#M17826</link>
      <description>Ervin,&lt;BR /&gt;&lt;BR /&gt;Another point to keep in mind: &lt;BR /&gt;Scripts in /sbin/init.d run as 'root', so make sure this is what you want to do.&lt;BR /&gt;Otherwise, your script should contain a line like 'su user1 -c &lt;COMMAND&gt; &lt;ARGUMENTS&gt;' if it needs to be run with another user ID.&lt;BR /&gt;&lt;BR /&gt;Dan&lt;BR /&gt;&lt;/ARGUMENTS&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Thu, 04 Jan 2001 06:39:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478329#M17826</guid>
      <dc:creator>Dan Hetzel</dc:creator>
      <dc:date>2001-01-04T06:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478330#M17827</link>
      <description>HI Dan&lt;BR /&gt;  I got it.Thank you for your excellent guide.&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;ervin</description>
      <pubDate>Thu, 04 Jan 2001 15:51:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478330#M17827</guid>
      <dc:creator>Ervin Liu</dc:creator>
      <dc:date>2001-01-04T15:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to auto start a script which required csh enviroment</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478331#M17828</link>
      <description>You're welcome !&lt;BR /&gt;Thanks for the points.&lt;BR /&gt;&lt;BR /&gt;Dan</description>
      <pubDate>Thu, 04 Jan 2001 15:54:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-auto-start-a-script-which-required-csh-enviroment/m-p/2478331#M17828</guid>
      <dc:creator>Dan Hetzel</dc:creator>
      <dc:date>2001-01-04T15:54:32Z</dc:date>
    </item>
  </channel>
</rss>

