<?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: Manage shell scripting environments in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671228#M658490</link>
    <description>Hi Matt:&lt;BR /&gt;&lt;BR /&gt;Consider establishing includable files of common variables that you can source (read) as needed.  This is done with the 'dot-space-filename' syntax so that no new environment is created.  This approach can be used to conditionally choose to include either a production or a test suite of variable values based on a runtime argument.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 06 Aug 2010 11:24:29 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2010-08-06T11:24:29Z</dc:date>
    <item>
      <title>Manage shell scripting environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671226#M658488</link>
      <description>Hello all, &lt;BR /&gt;&lt;BR /&gt;I have taken over a couple of shell scripting suites and would like to know if there are any best practice guides or general practices on how to best manage large shell scripting environments while keeping them flexible?&lt;BR /&gt;In my case I have a large set of live scripts where most things are hard coded (paths and databases for example) and scripts are piggy backed onto each other (script1 calls script2 calls script 4 and so on...). To create a test environment is bit of a nightmare, pretty much every script have to be 'tweaked' to work in test.&lt;BR /&gt;I am looking to re-write quite a lot of it to make it workable and maintainable long term.&lt;BR /&gt;&lt;BR /&gt;All ideas and advice would be most appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Matt</description>
      <pubDate>Fri, 06 Aug 2010 08:54:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671226#M658488</guid>
      <dc:creator>Mattias Johnsson</dc:creator>
      <dc:date>2010-08-06T08:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Manage shell scripting environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671227#M658489</link>
      <description>.The best way is to declare the varibales in the beggining of every script, it will help us to change the values later time easly. &lt;BR /&gt;.Use funactions to keep the scripts as simple as much.</description>
      <pubDate>Fri, 06 Aug 2010 09:22:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671227#M658489</guid>
      <dc:creator>N,Vipin</dc:creator>
      <dc:date>2010-08-06T09:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Manage shell scripting environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671228#M658490</link>
      <description>Hi Matt:&lt;BR /&gt;&lt;BR /&gt;Consider establishing includable files of common variables that you can source (read) as needed.  This is done with the 'dot-space-filename' syntax so that no new environment is created.  This approach can be used to conditionally choose to include either a production or a test suite of variable values based on a runtime argument.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Aug 2010 11:24:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671228#M658490</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-08-06T11:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Manage shell scripting environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671229#M658491</link>
      <description>&lt;!--!*#--&gt;Hi (again) Matt:&lt;BR /&gt;&lt;BR /&gt;You could also build an includable file of functions that you want to deploy into more than one script.  This file might look like:&lt;BR /&gt;&lt;BR /&gt;# cat /home/matt/functions&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;function tattle&lt;BR /&gt;{&lt;BR /&gt;    echo "tattle() saw $@"&lt;BR /&gt;}&lt;BR /&gt;function listdir&lt;BR /&gt;{&lt;BR /&gt;    echo "current directory : $PWD"&lt;BR /&gt;    ls&lt;BR /&gt;}&lt;BR /&gt;#_end_of_functions_&lt;BR /&gt;&lt;BR /&gt;...and you could deploy it like:&lt;BR /&gt;&lt;BR /&gt;# cat ./mytest&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;. /home/matt/functions&lt;BR /&gt;tattle "Mattias Johnsson"&lt;BR /&gt;cd /var/tmp &amp;amp;&amp;amp; listdir&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 06 Aug 2010 12:06:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671229#M658491</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-08-06T12:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Manage shell scripting environments</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671230#M658492</link>
      <description>Another technique is to use a separate config file. I recently wrote a script to replace sendmail for sending authenticated email. With more than 100 MB of addons (KRNG, OpenSSL, CyrusSASL), it seemed overkill just to perform a simple authentication. The script started out with a lot of hardcoded variables but it became apparent that this would be useful in many environments. So I moved all the configurable variables to an /etc config file like this:&lt;BR /&gt; &lt;BR /&gt;## config file&lt;BR /&gt;MAILRELAY=abc.xyz.com&lt;BR /&gt;MAILRELAYPORT=587&lt;BR /&gt;AUTHPLAIN="sdkchweiy43yutewurkw786h50ythbo="&lt;BR /&gt;REPLYTO=bill@bill.com&lt;BR /&gt; &lt;BR /&gt;And just for extra credit, I added checks for these variables already preassigned so that the config file would only be used for default values.</description>
      <pubDate>Fri, 06 Aug 2010 23:25:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/manage-shell-scripting-environments/m-p/4671230#M658492</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2010-08-06T23:25:21Z</dc:date>
    </item>
  </channel>
</rss>

