<?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: Unix script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535090#M898751</link>
    <description>Hi Bruce:&lt;BR /&gt;&lt;BR /&gt;Ah, yes, good catch.  I didn't mean to (s)queeze the multiple occurances to one in this case!  I did (do) it frequently for strings involving blank characters and ...well...&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 01 Jun 2001 16:28:51 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2001-06-01T16:28:51Z</dc:date>
    <item>
      <title>Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535077#M898738</link>
      <description>Does anyone have a script to convert lower case file names to upper case?&lt;BR /&gt;i.e., (abcdef.cbl to ABCDEF.cbl)</description>
      <pubDate>Thu, 31 May 2001 14:59:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535077#M898738</guid>
      <dc:creator>David B. Bordwick</dc:creator>
      <dc:date>2001-05-31T14:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535078#M898739</link>
      <description>Hi David:&lt;BR /&gt;&lt;BR /&gt;'tr' will do this.  For exampe:&lt;BR /&gt;&lt;BR /&gt;# echo "abc"|tr -s '[:lower:]' '[:upper:]'&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 31 May 2001 15:06:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535078#M898739</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-05-31T15:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535079#M898740</link>
      <description>you want to be looking at tr in the following way&lt;BR /&gt;&lt;BR /&gt;with a few move commands too...&lt;BR /&gt;&lt;BR /&gt;tr [a-z] [A-Z] &lt;BR /&gt;&lt;BR /&gt;I try to root something out...&lt;BR /&gt;Later,&lt;BR /&gt;Bill</description>
      <pubDate>Thu, 31 May 2001 15:07:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535079#M898740</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2001-05-31T15:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535080#M898741</link>
      <description>Hi&lt;BR /&gt;I don't have script, but you can use perl to do it. Perl has function called "uc"&lt;BR /&gt;&lt;BR /&gt;For example&lt;BR /&gt;#!/usr/local/bin/perl&lt;BR /&gt;open(LOWER,"filename");&lt;BR /&gt;open(UPPER,"&lt;FILENAME1&gt;&lt;/FILENAME1&gt;foreach (LOWER)&lt;BR /&gt;  $line=uc;&lt;BR /&gt;  print UPPER "$line2";&lt;BR /&gt;end&lt;BR /&gt;&lt;BR /&gt;Sachin&lt;BR /&gt;</description>
      <pubDate>Thu, 31 May 2001 15:11:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535080#M898741</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2001-05-31T15:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535081#M898742</link>
      <description>I also like to use the typeset command in a script to handle jobs like this:&lt;BR /&gt;&lt;BR /&gt;for f in *&lt;BR /&gt;do&lt;BR /&gt;    typeset -u UCASE=$f&lt;BR /&gt;    print $f $UCASE&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The -u option on the typeset command sets the UCASE variable to be upper case.  I like this method because I'm too lazy to remember all the options for the 'tr' command.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 31 May 2001 15:18:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535081#M898742</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2001-05-31T15:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535082#M898743</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;Looking further at what you wrote, if you wanted to keep the file extension part (after the dot) in lower case, you might use 'awk' like this, for example:&lt;BR /&gt;&lt;BR /&gt;# echo "abc.txt"|awk -F. '{X=toupper($1);print X FS $2}'&lt;BR /&gt;&lt;BR /&gt;This sets the field delimiter as a dot character, translates the first field to uppercase, and outputs the translated field, the field separator (the dot) and the second, unaltered field.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 31 May 2001 15:20:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535082#M898743</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-05-31T15:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535083#M898744</link>
      <description>cd /PATH&lt;BR /&gt;ll *.cbl|awk '{print $9}'&amp;gt;file&lt;BR /&gt;tr [a-z] [A-Z] &lt;FILE&gt; file2&lt;BR /&gt;paste file file2 &amp;gt;file3&lt;BR /&gt;while read i,j&lt;BR /&gt;do&lt;BR /&gt;mv $i $j&lt;BR /&gt;done&lt;FILE3&gt;&lt;/FILE3&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FILE&gt;</description>
      <pubDate>Thu, 31 May 2001 15:22:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535083#M898744</guid>
      <dc:creator>Vincenzo Restuccia</dc:creator>
      <dc:date>2001-05-31T15:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535084#M898745</link>
      <description>This is what I use:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;#&lt;BR /&gt;# Script to convert mixed case names &lt;BR /&gt;# to lower case&lt;BR /&gt;#&lt;BR /&gt;for upper_name in *&lt;BR /&gt; do&lt;BR /&gt;     lower_name=$(echo $upper_name | tr "[:upper:]" "[:lower:]")&lt;BR /&gt;                mv $upper_name $lower_name 2&amp;gt; /dev/null&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Thu, 31 May 2001 16:06:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535084#M898745</guid>
      <dc:creator>Rob Mallard</dc:creator>
      <dc:date>2001-05-31T16:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535085#M898746</link>
      <description>Try this one:&lt;BR /&gt;&lt;BR /&gt;for file&lt;BR /&gt;do &lt;BR /&gt; my $file `echo$file | tr "[a-z]" "[A-Z]"`&lt;BR /&gt;done</description>
      <pubDate>Thu, 31 May 2001 20:02:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535085#M898746</guid>
      <dc:creator>Victor_5</dc:creator>
      <dc:date>2001-05-31T20:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535086#M898747</link>
      <description>&lt;BR /&gt;look at man tr:&lt;BR /&gt;&lt;BR /&gt;you'll find -&amp;gt;  tr -s '[:upper:]''[:lower:]'</description>
      <pubDate>Fri, 01 Jun 2001 05:40:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535086#M898747</guid>
      <dc:creator>federico_3</dc:creator>
      <dc:date>2001-06-01T05:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535087#M898748</link>
      <description>Be careful with the tr command, it uses the LC_COLLATE variable... try the following commands :&lt;BR /&gt;&lt;BR /&gt;# export LC_COLLATE=fr_FR.iso88591&lt;BR /&gt;# echo ABCDEF | tr '[a-z]' '[A-Z]'&lt;BR /&gt;&lt;BR /&gt;Not really the result I would expect... But who cares about non US english people... ;)&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Jun 2001 07:01:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535087#M898748</guid>
      <dc:creator>Laurent Paumier</dc:creator>
      <dc:date>2001-06-01T07:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535088#M898749</link>
      <description>#BEGINN&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;echo "directory who file reside \c"; read DIR&lt;BR /&gt;echo "Waiting...."&lt;BR /&gt;cd $DIR&lt;BR /&gt;for j in .name of any directory?s if there are.&lt;BR /&gt;do&lt;BR /&gt;     cd $DIR/$j&lt;BR /&gt;     for i in `ls -1`&lt;BR /&gt;       do &lt;BR /&gt;         mv $i `echo $i | tr "[a-z]" "[A-Z]"`&lt;BR /&gt;       done&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;I think i could help you&lt;BR /&gt;Mohamed&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Jun 2001 07:10:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535088#M898749</guid>
      <dc:creator>AlHassani Mohamed</dc:creator>
      <dc:date>2001-06-01T07:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535089#M898750</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I agree that if you don't want to convert the extention then perl or awk are your best bets.  Also, if you use tr, you probably do not want the -s option, which squeezes two or more repeating characters to a single character.  Thus,&lt;BR /&gt;&lt;BR /&gt;echo "aabbcc" | tr -s "[:lower:]" "[:upper:]"&lt;BR /&gt;&lt;BR /&gt;yields the string "ABC", not "AABBCC".&lt;BR /&gt;&lt;BR /&gt;--Bruce</description>
      <pubDate>Fri, 01 Jun 2001 15:41:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535089#M898750</guid>
      <dc:creator>Bruce Regittko_1</dc:creator>
      <dc:date>2001-06-01T15:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535090#M898751</link>
      <description>Hi Bruce:&lt;BR /&gt;&lt;BR /&gt;Ah, yes, good catch.  I didn't mean to (s)queeze the multiple occurances to one in this case!  I did (do) it frequently for strings involving blank characters and ...well...&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Jun 2001 16:28:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535090#M898751</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-06-01T16:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unix script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535091#M898752</link>
      <description>Hi,&lt;BR /&gt;This will list pick all .cbl from a directory&lt;BR /&gt;and turn to upper case.&lt;BR /&gt;Currently cp is commented, just incase you&lt;BR /&gt;need it, uncomment it.&lt;BR /&gt;Hope it helps.&lt;BR /&gt;#**Start Script****&lt;BR /&gt;for i in *.cbl&lt;BR /&gt;do&lt;BR /&gt;echo $i&lt;BR /&gt;name_no_ext=`echo $i| cut -f1 -d"."|tr [a-z] [A-Z] `&lt;BR /&gt;echo "Original : " $i&lt;BR /&gt;echo "Upper Case : " $name_no_ext.cbl&lt;BR /&gt;#cp $i $name_no_ext.cbl&lt;BR /&gt;done    &lt;BR /&gt;#**End Script****&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards&lt;BR /&gt;Deepak&lt;BR /&gt;</description>
      <pubDate>Sat, 02 Jun 2001 11:15:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unix-script/m-p/2535091#M898752</guid>
      <dc:creator>Deepak_5</dc:creator>
      <dc:date>2001-06-02T11:15:23Z</dc:date>
    </item>
  </channel>
</rss>

