<?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: some scripting now. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945896#M412669</link>
    <description>&lt;BR /&gt;Good catch James.&lt;BR /&gt;&lt;BR /&gt;We would need to know what defines a word for the problem to be solved.&lt;BR /&gt;&lt;BR /&gt;Anyway... it was of course mostly to highlight an alternative approach.&lt;BR /&gt;&lt;BR /&gt;We can make it work like Jrp's code.&lt;BR /&gt;Using his example using:&lt;BR /&gt;&lt;BR /&gt;[root@music /tmp]$ cat x&lt;BR /&gt;this is jrf's code-running&lt;BR /&gt;&lt;BR /&gt;[root@music /tmp]$ perl  -pe 's/(^\w|\s\w)/uc($1)/ge' x&lt;BR /&gt;This Is Jrf's Code-running&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The tricky part now is the first word which has no whitespace, and needs an 'or' construction. Using the boundary match \b avoids that.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Sun, 11 Dec 2005 11:17:59 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2005-12-11T11:17:59Z</dc:date>
    <item>
      <title>some scripting now.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945889#M412662</link>
      <description>I have lines as follows.&lt;BR /&gt;&lt;BR /&gt;to me you&lt;BR /&gt;what where when&lt;BR /&gt;&lt;BR /&gt;I want them to as follows.&lt;BR /&gt;&lt;BR /&gt;To Me You&lt;BR /&gt;What Where When&lt;BR /&gt;&lt;BR /&gt;I can do it with some scripting, but want a quick answer, so can not waste time on it.</description>
      <pubDate>Fri, 09 Dec 2005 06:17:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945889#M412662</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-12-09T06:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: some scripting now.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945890#M412663</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# perl -lne '@list=();foreach $word (split) {push @list,ucfirst $word};print "@list"' file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 09 Dec 2005 06:52:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945890#M412663</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-09T06:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: some scripting now.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945891#M412664</link>
      <description>I was working on this--&lt;BR /&gt;cat test555.txt | while read line; do for i in $(echo ${line}); do first=$(echo ${i} | cut -c1|tr "[:lower:]" "[:upper:]"|tr "\n" " " ; rest=$(echo ${i} | cut -c2- | tr "\n" " "); echo ${first}${rest}; done; done&lt;BR /&gt;&lt;BR /&gt;JRF's solution worked...&lt;BR /&gt;&lt;BR /&gt;I must learn PERL&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;</description>
      <pubDate>Fri, 09 Dec 2005 07:05:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945891#M412664</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-12-09T07:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: some scripting now.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945892#M412665</link>
      <description>I mentioned.</description>
      <pubDate>Fri, 09 Dec 2005 07:38:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945892#M412665</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-12-09T07:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: some scripting now.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945893#M412666</link>
      <description>had to give sed exmp&lt;BR /&gt;&lt;BR /&gt;mac()&lt;BR /&gt;{&lt;BR /&gt;for arg in a b c d e f g h i j k l m n o p q r s t u v w x y z&lt;BR /&gt;do&lt;BR /&gt;UP=$(echo ${arg}|tr "[a-z]" "[A-Z]" )&lt;BR /&gt;echo "s/ ${arg}/ ${UP}/g"&lt;BR /&gt;echo "s/^${arg}/${UP}/"&lt;BR /&gt;done&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;mac &amp;gt; sedfile&lt;BR /&gt;cat test | sed -f sedfile  &lt;BR /&gt;&lt;BR /&gt;Yes perl is better</description>
      <pubDate>Sat, 10 Dec 2005 02:32:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945893#M412666</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2005-12-10T02:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: some scripting now.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945894#M412667</link>
      <description>&lt;BR /&gt;perl -pe 's/\b(\w)/uc($1)/ge' your-file&lt;BR /&gt;&lt;BR /&gt;-p  loop trhough input reading into and print $_ after processing&lt;BR /&gt;-e program text to follow&lt;BR /&gt;s/regexpr/expr/eg  for each occurence (g) of regexpr in $_ substitute it  by ethe value  of expr after executing expr &lt;BR /&gt;&lt;BR /&gt;\b(\w) = remember a 'word character' following an word boundary in $1&lt;BR /&gt;uc($1) = upcase $1&lt;BR /&gt;&lt;BR /&gt;grins,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 10 Dec 2005 17:12:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945894#M412667</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-12-10T17:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: some scripting now.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945895#M412668</link>
      <description>Hi (again) RAC:&lt;BR /&gt;&lt;BR /&gt;Hein's solution differs from mine in length but also in what constitutes a "word".  It's worth noting :-))&lt;BR /&gt;&lt;BR /&gt;You can test either Hein's or my solution interactively by omitting the filename argument at runtime.&lt;BR /&gt;&lt;BR /&gt;The difference in input (denoted with "&amp;lt;" and the corresponding output ("&amp;gt;") is thus exposed;&lt;BR /&gt;&lt;BR /&gt;&amp;lt; this is jrf's code-running&lt;BR /&gt;&amp;gt; This Is Jrf's Code-running&lt;BR /&gt;&lt;BR /&gt;&amp;lt; this is hein's code-running&lt;BR /&gt;&amp;gt; This Is Hein'S Code-Running&lt;BR /&gt;&lt;BR /&gt;Note the treatment characters that follow a single quote (apostrophes) or a hyphen.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 11 Dec 2005 10:56:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945895#M412668</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-11T10:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: some scripting now.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945896#M412669</link>
      <description>&lt;BR /&gt;Good catch James.&lt;BR /&gt;&lt;BR /&gt;We would need to know what defines a word for the problem to be solved.&lt;BR /&gt;&lt;BR /&gt;Anyway... it was of course mostly to highlight an alternative approach.&lt;BR /&gt;&lt;BR /&gt;We can make it work like Jrp's code.&lt;BR /&gt;Using his example using:&lt;BR /&gt;&lt;BR /&gt;[root@music /tmp]$ cat x&lt;BR /&gt;this is jrf's code-running&lt;BR /&gt;&lt;BR /&gt;[root@music /tmp]$ perl  -pe 's/(^\w|\s\w)/uc($1)/ge' x&lt;BR /&gt;This Is Jrf's Code-running&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The tricky part now is the first word which has no whitespace, and needs an 'or' construction. Using the boundary match \b avoids that.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 11 Dec 2005 11:17:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/some-scripting-now/m-p/4945896#M412669</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-12-11T11:17:59Z</dc:date>
    </item>
  </channel>
</rss>

