<?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: Easy Points - sed/awk help again in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788105#M78983</link>
    <description>"This is kid of beside the point."&lt;BR /&gt;(That's cute! Meant kind.)&lt;BR /&gt;N/A please.&lt;BR /&gt;Kel</description>
    <pubDate>Fri, 16 Aug 2002 18:50:30 GMT</pubDate>
    <dc:creator>Kelli Ward</dc:creator>
    <dc:date>2002-08-16T18:50:30Z</dc:date>
    <item>
      <title>Easy Points - sed/awk help again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788103#M78981</link>
      <description>I know this will be easy for you guys/girls, but how can I take a text file and covert the first letter of each field to caps.  I know I could somehow do it with tr and cut but figured you may know of a better way.  &lt;BR /&gt;&lt;BR /&gt;Sample before data:&lt;BR /&gt;robert d anderson&lt;BR /&gt;steven g johnson&lt;BR /&gt;joseph wilson&lt;BR /&gt;andrew j jones&lt;BR /&gt;&lt;BR /&gt;Sample after data:&lt;BR /&gt;Robert D Anderson&lt;BR /&gt;Steven G Johnson&lt;BR /&gt;Joseph wilson&lt;BR /&gt;Andrew J Jones&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Greg</description>
      <pubDate>Fri, 16 Aug 2002 18:35:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788103#M78981</guid>
      <dc:creator>Greg Stark_1</dc:creator>
      <dc:date>2002-08-16T18:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Points - sed/awk help again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788104#M78982</link>
      <description>Hi Greg,&lt;BR /&gt;&lt;BR /&gt;This is kid of beside the point, but I posted a question recently for online learning sites, in it are a couple of nice pages on awk and sed.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf5384b3ef09fd611abdb0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf5384b3ef09fd611abdb0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, if you have some good online learning sites and want to share, post them and I'll give you easy points. ;)&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Kel</description>
      <pubDate>Fri, 16 Aug 2002 18:48:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788104#M78982</guid>
      <dc:creator>Kelli Ward</dc:creator>
      <dc:date>2002-08-16T18:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Points - sed/awk help again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788105#M78983</link>
      <description>"This is kid of beside the point."&lt;BR /&gt;(That's cute! Meant kind.)&lt;BR /&gt;N/A please.&lt;BR /&gt;Kel</description>
      <pubDate>Fri, 16 Aug 2002 18:50:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788105#M78983</guid>
      <dc:creator>Kelli Ward</dc:creator>
      <dc:date>2002-08-16T18:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Points - sed/awk help again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788106#M78984</link>
      <description>Hi Greg,&lt;BR /&gt;&lt;BR /&gt;Would you mind if I don't use awk and sed?.&lt;BR /&gt;&lt;BR /&gt;Following is one quick primitive way of doing.&lt;BR /&gt;"file" is where your data is.&lt;BR /&gt;&lt;BR /&gt;cat file |while read LINE                                  &lt;BR /&gt;do                                                         &lt;BR /&gt;for WORD in $LINE                                          &lt;BR /&gt;do                                                         &lt;BR /&gt;FIRST=`echo $WORD |cut -c 1|tr -s '[:lower:]' '[:upper:]'` &lt;BR /&gt;NEXT=`echo $WORD |cut -c 2-`                               &lt;BR /&gt;printf "${FIRST}${NEXT} "                                  &lt;BR /&gt;done                                                       &lt;BR /&gt;printf "\n"                                                &lt;BR /&gt;done                                                       &lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Aug 2002 18:53:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788106#M78984</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2002-08-16T18:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Points - sed/awk help again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788107#M78985</link>
      <description>awk '{for(i=1;i&amp;lt;=$NF;i++){x=toupper(substr($i,1,1));y=substr($i,2);printf("%c%s ",x,y)};printf("\n")} &lt;FILENAME&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Fri, 16 Aug 2002 19:19:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788107#M78985</guid>
      <dc:creator>Tom Danzig</dc:creator>
      <dc:date>2002-08-16T19:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Points - sed/awk help again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788108#M78986</link>
      <description>Greg,&lt;BR /&gt;&lt;BR /&gt;Here is a short perl routine.&lt;BR /&gt;&lt;BR /&gt;cat file | perl -e 'while(&amp;lt;&amp;gt;) { while(/(\S+)(\s+)/g) {print ucfirst($1),$2 }}'&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Fri, 16 Aug 2002 19:30:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788108#M78986</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-08-16T19:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Points - sed/awk help again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788109#M78987</link>
      <description>How about perl?&lt;BR /&gt;&lt;BR /&gt;cat test | perl -e 'while (&amp;lt;&amp;gt;) {s/(\w+)/\u$1/g;print}'&lt;BR /&gt;&lt;BR /&gt;Tom</description>
      <pubDate>Fri, 16 Aug 2002 19:31:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788109#M78987</guid>
      <dc:creator>Tom Maloy</dc:creator>
      <dc:date>2002-08-16T19:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Points - sed/awk help again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788110#M78988</link>
      <description>How about this one&lt;BR /&gt;&lt;BR /&gt;fasprd01:/home/tjohnson:570$ cat tom.txt&lt;BR /&gt;robert d anderson&lt;BR /&gt;steven g johnson&lt;BR /&gt;joseph wilson&lt;BR /&gt;andrew j jones&lt;BR /&gt;fasprd01:/home/tjohnson:571$ cat tom.txt | awk -f cap1stletter.awk&lt;BR /&gt;Robert D Anderson&lt;BR /&gt;Steven G Johnson&lt;BR /&gt;Joseph Wilson&lt;BR /&gt;Andrew J Jones&lt;BR /&gt;fasprd01:/home/tjohnson:572$ cat cap1stletter.awk&lt;BR /&gt;# capitalize 1st letter in string&lt;BR /&gt;&lt;BR /&gt;function capital(input, result, words, n, i, w)&lt;BR /&gt;{&lt;BR /&gt; result = ""&lt;BR /&gt; n = split(input, words, " ")&lt;BR /&gt;  for (i - 1; i &amp;lt;= n; i++) {&lt;BR /&gt;   w = words[i]&lt;BR /&gt;   w = toupper(substr(w, 1, 1)) substr(w, 2)&lt;BR /&gt;    if (i &amp;gt; 1)&lt;BR /&gt;     result = result " "&lt;BR /&gt;     result = result w&lt;BR /&gt;}&lt;BR /&gt;return result&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;{ print capital($0) }&lt;BR /&gt;fasprd01:/home/tjohnson:573$&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Aug 2002 19:32:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788110#M78988</guid>
      <dc:creator>OneNeck UNIXSA</dc:creator>
      <dc:date>2002-08-16T19:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Easy Points - sed/awk help again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788111#M78989</link>
      <description>Thanks everyone for the quick response.  Sorry Kelli, I got carried away with the point dropdowns on your second reply.&lt;BR /&gt;&lt;BR /&gt;Greg</description>
      <pubDate>Fri, 16 Aug 2002 19:42:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/easy-points-sed-awk-help-again/m-p/2788111#M78989</guid>
      <dc:creator>Greg Stark_1</dc:creator>
      <dc:date>2002-08-16T19:42:17Z</dc:date>
    </item>
  </channel>
</rss>

