<?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: Accept caps and lowercase in script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440582#M682747</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;An easy way is to use 'typeset -l' which cause everything to be lower-cased:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;typeset -l ANS&lt;BR /&gt;read ANS&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Now you need only compare in lowercase.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 16 Jun 2009 13:55:16 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2009-06-16T13:55:16Z</dc:date>
    <item>
      <title>Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440581#M682746</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have the following:&lt;BR /&gt;&lt;BR /&gt;elif [ $ANS = ALL ]; then&lt;BR /&gt;        echo "worked"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My script works great if the input is exactly ALL.  How do I allow "all" "All" etc...</description>
      <pubDate>Tue, 16 Jun 2009 13:51:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440581#M682746</guid>
      <dc:creator>dev44</dc:creator>
      <dc:date>2009-06-16T13:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440582#M682747</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;An easy way is to use 'typeset -l' which cause everything to be lower-cased:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;typeset -l ANS&lt;BR /&gt;read ANS&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Now you need only compare in lowercase.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 16 Jun 2009 13:55:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440582#M682747</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-16T13:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440583#M682748</link>
      <description>Hi James...thanks for the response.  It didn't recognize it as ALL or all with typeset -l ANS in there.  Also, sometimes the ans will be numeric...will typeset -l cause problems with that?</description>
      <pubDate>Tue, 16 Jun 2009 14:53:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440583#M682748</guid>
      <dc:creator>dev44</dc:creator>
      <dc:date>2009-06-16T14:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440584#M682749</link>
      <description>are you sure it is not working ? Did you specify -l switch correctly (that is not a capital i, it is a lowercase L)&lt;BR /&gt;&lt;BR /&gt;also, numeric entries should not matter as they will be interpreted as strings. It will be a problem if you making a numeric comparison in your if [] constructs, but for the code segment you provided, entering numerics is fine</description>
      <pubDate>Tue, 16 Jun 2009 15:15:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440584#M682749</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2009-06-16T15:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440585#M682750</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;I think you missed my point:&lt;BR /&gt;&lt;BR /&gt;# typeset -l ANS;read ANS;[ "$ANS" = "all" ] &amp;amp;&amp;amp; echo "OK" || echo "NOT_OK"&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Also, sometimes the ans will be numeric...will typeset -l cause problems with that?&lt;BR /&gt;&lt;BR /&gt;No, the conversion to all lowercase only affects letters.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 16 Jun 2009 15:16:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440585#M682750</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-16T15:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440586#M682751</link>
      <description>#! /usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;out=/tmp/omni.out&lt;BR /&gt;if [ -f $out ]; then&lt;BR /&gt;        rm $out&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;ps -ef |grep -i omni |awk '{print $2}' &amp;gt;$out&lt;BR /&gt;ps -ef |grep -i omni&lt;BR /&gt;echo "Please select the Process ID to kill (second column),"&lt;BR /&gt;echo " or type all if you want all omni processes killed. \n"&lt;BR /&gt;typeset -l ANS&lt;BR /&gt;read ANS&lt;BR /&gt;&lt;BR /&gt;if grep -q $ANS $out; then&lt;BR /&gt;        echo "This is a valid PID...killing process"&lt;BR /&gt;#       /usr/local/bin/sudo kill -9 $ANS&lt;BR /&gt;elif [ $ANS = ALL ]; then&lt;BR /&gt;        echo "All omni processes will be terminated"&lt;BR /&gt;#       for i in `cat $out`; do&lt;BR /&gt;#               /usr/local/bin/sudo kill -9 $i&lt;BR /&gt;#       done&lt;BR /&gt;else&lt;BR /&gt;        echo "This PID is not valid.  Run the script again and"&lt;BR /&gt;        echo "select your PID from the second column, or type ALL to kill all omni processes."&lt;BR /&gt;fi&lt;BR /&gt;rm $out&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;&lt;BR /&gt;Please select the Process ID to kill (second column),&lt;BR /&gt; or type all if you want all omni processes killed.&lt;BR /&gt;&lt;BR /&gt;all -&amp;gt;input by me&lt;BR /&gt;This PID is not valid.  Run the script again and&lt;BR /&gt;select your PID from the second column, or type ALL to kill all omni processes.&lt;BR /&gt;&lt;BR /&gt;I also typed ALL and it didn't like it either.  When typeset -l isn't there I can type ALL and it works....</description>
      <pubDate>Tue, 16 Jun 2009 15:51:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440586#M682751</guid>
      <dc:creator>dev44</dc:creator>
      <dc:date>2009-06-16T15:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440587#M682752</link>
      <description>I think I found it....I have &lt;BR /&gt;&lt;BR /&gt;[$ANS = ALL] and should be [ $ANS = all ]&lt;BR /&gt;&lt;BR /&gt;Thanks...</description>
      <pubDate>Tue, 16 Jun 2009 15:53:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440587#M682752</guid>
      <dc:creator>dev44</dc:creator>
      <dc:date>2009-06-16T15:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440588#M682753</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;By using the 'typeset -l' _every_ letter is translated to lowercase in the variable typeset!&lt;BR /&gt;&lt;BR /&gt;Your test:&lt;BR /&gt;&lt;BR /&gt;[ $ANS = ALL ]&lt;BR /&gt;&lt;BR /&gt;...will never evaluate true.  You want to make it:&lt;BR /&gt;&lt;BR /&gt;[ $ANS = all ]&lt;BR /&gt;&lt;BR /&gt;After all (no pun) this allows you to say "ALL", "All", "aLL" or "aLl" any way you choose!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 16 Jun 2009 16:00:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440588#M682753</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-16T16:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440589#M682754</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Seems like its time to actually test your script, versus asking us to evaluate it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Resources&lt;BR /&gt;&lt;A href="http://www.unix.com/shell-programming-scripting/31743-accepting-upper-lower-case.html" target="_blank"&gt;http://www.unix.com/shell-programming-scripting/31743-accepting-upper-lower-case.html&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.daniweb.com/forums/thread136257.html" target="_blank"&gt;http://www.daniweb.com/forums/thread136257.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Converting input:&lt;BR /&gt;&lt;A href="http://www.cyberciti.biz/faq/linux-unix-shell-programming-converting-lowercase-uppercase/" target="_blank"&gt;http://www.cyberciti.biz/faq/linux-unix-shell-programming-converting-lowercase-uppercase/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Jun 2009 16:14:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440589#M682754</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-06-16T16:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440590#M682755</link>
      <description>You can also use case for this (atleast in bash).&lt;BR /&gt;&lt;BR /&gt;case $ANS in&lt;BR /&gt;   case ALL|all)&lt;BR /&gt;      Commands goes here&lt;BR /&gt;   ;;&lt;BR /&gt;   case [Aa][Ll][Ll])&lt;BR /&gt;      This  method should work too, commands goes here&lt;BR /&gt;   ;;&lt;BR /&gt;   case *)&lt;BR /&gt;      if it didn't match, commands goes here&lt;BR /&gt;   ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik eriksson</description>
      <pubDate>Wed, 17 Jun 2009 13:01:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440590#M682755</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2009-06-17T13:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440591#M682756</link>
      <description>&lt;BR /&gt;You could try using tr and force&lt;BR /&gt;all input to uppercase without&lt;BR /&gt;having an effect on anything else.&lt;BR /&gt;&lt;BR /&gt;ANS=`echo ${ANS} | tr [a-z][A-Z]`&lt;BR /&gt;elif [ $ANS = "ALL" ]; then&lt;BR /&gt;echo "worked"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Ken&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Jun 2009 17:46:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440591#M682756</guid>
      <dc:creator>Ken Martin_3</dc:creator>
      <dc:date>2009-06-17T17:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440592#M682757</link>
      <description>&lt;!--!*#--&gt;&amp;gt; You could try using tr [...]&lt;BR /&gt;&lt;BR /&gt;Or, if you like typing the alphabet, there's&lt;BR /&gt;always "sed":&lt;BR /&gt;&lt;BR /&gt;dy # echo 'aBcDeF' | sed -e 'y/abcdef/ABCDEF/'&lt;BR /&gt;ABCDEF&lt;BR /&gt;&lt;BR /&gt;(Anything worth doing is worth doing with&lt;BR /&gt;"sed", I always say.)</description>
      <pubDate>Thu, 18 Jun 2009 03:06:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440592#M682757</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-06-18T03:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Accept caps and lowercase in script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440593#M682758</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Please assign some points who give there valuable time for your problem.&lt;BR /&gt;&lt;BR /&gt;To know how to assign points please go through the below link.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums13.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums13.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Suraj</description>
      <pubDate>Thu, 18 Jun 2009 03:37:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/accept-caps-and-lowercase-in-script/m-p/4440593#M682758</guid>
      <dc:creator>Suraj K Sankari</dc:creator>
      <dc:date>2009-06-18T03:37:44Z</dc:date>
    </item>
  </channel>
</rss>

