<?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: need help with shell scripting 101 class in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894578#M402979</link>
    <description>To claify my question.&lt;BR /&gt;&lt;BR /&gt;I want to 'hardcode' "Huggers " before whatever value is in file A, so that "Huggers " always preceeds the contents of File A and is written to File B.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Randy</description>
    <pubDate>Tue, 05 Apr 2005 14:29:28 GMT</pubDate>
    <dc:creator>Randy Hagedorn</dc:creator>
    <dc:date>2005-04-05T14:29:28Z</dc:date>
    <item>
      <title>need help with shell scripting 101 class</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894575#M402976</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am a novice at HP-UX shell scripting. I need help with the syntax of the following.&lt;BR /&gt;&lt;BR /&gt;File A, contains "Buggers".&lt;BR /&gt;&lt;BR /&gt;I want file B with the results of "Huggers Buggers". How would I write a script to concatenate "Huggers " with "Buggers"?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Randy</description>
      <pubDate>Tue, 05 Apr 2005 14:09:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894575#M402976</guid>
      <dc:creator>Randy Hagedorn</dc:creator>
      <dc:date>2005-04-05T14:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: need help with shell scripting 101 class</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894576#M402977</link>
      <description>&lt;BR /&gt;First lesson:&lt;BR /&gt;&lt;BR /&gt;review your questions from the audience perspective. In doing so, you may actually solve the problem.&lt;BR /&gt;&lt;BR /&gt;In this case... where is 'Huggers' coming from? File C? Every other lines in file A?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You might not needs a scripts... the 'paste' command may well do just what you need.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Apr 2005 14:17:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894576#M402977</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-04-05T14:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: need help with shell scripting 101 class</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894577#M402978</link>
      <description>Try:&lt;BR /&gt;&lt;BR /&gt;cat Huggers Buggers &amp;gt; HuggersBuggers&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 05 Apr 2005 14:19:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894577#M402978</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-04-05T14:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: need help with shell scripting 101 class</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894578#M402979</link>
      <description>To claify my question.&lt;BR /&gt;&lt;BR /&gt;I want to 'hardcode' "Huggers " before whatever value is in file A, so that "Huggers " always preceeds the contents of File A and is written to File B.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Randy</description>
      <pubDate>Tue, 05 Apr 2005 14:29:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894578#M402979</guid>
      <dc:creator>Randy Hagedorn</dc:creator>
      <dc:date>2005-04-05T14:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: need help with shell scripting 101 class</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894579#M402980</link>
      <description>sed 's/^/Huggers /' FileA &amp;gt; FileB&lt;BR /&gt;&lt;BR /&gt;sed 's/Buggers/Huggers Buggers/' A &amp;gt; B</description>
      <pubDate>Tue, 05 Apr 2005 14:35:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894579#M402980</guid>
      <dc:creator>Bob Smith_23</dc:creator>
      <dc:date>2005-04-05T14:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: need help with shell scripting 101 class</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894580#M402981</link>
      <description># Pure Shell solution&lt;BR /&gt;&lt;BR /&gt;OFILE="FileB"&lt;BR /&gt;echo "Huggers \c" &amp;gt; ${OFILE}&lt;BR /&gt;cat FileA &amp;gt;&amp;gt; ${OFILE}</description>
      <pubDate>Tue, 05 Apr 2005 14:41:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894580#M402981</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-04-05T14:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: need help with shell scripting 101 class</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894581#M402982</link>
      <description>Solution 1)&lt;BR /&gt;&lt;BR /&gt;while read -r line&lt;BR /&gt;echo "Huggers $line"&lt;BR /&gt;done &amp;lt; FileA &amp;gt; FileB&lt;BR /&gt;&lt;BR /&gt;Solution 2)&lt;BR /&gt;&lt;BR /&gt;cat FileA | sed 's/^/Huggers //' &amp;gt; FileB&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Apr 2005 14:41:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894581#M402982</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-04-05T14:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: need help with shell scripting 101 class</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894582#M402983</link>
      <description>If buggers is the only thing in file a,&lt;BR /&gt;&lt;BR /&gt;cat filea | while read line&lt;BR /&gt;do&lt;BR /&gt;var1=$line&lt;BR /&gt;echo "Huggers $line"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;If buggers is field 3 in file a, &lt;BR /&gt;lets say filea has the following text&lt;BR /&gt;&lt;BR /&gt;bob has buggers the size of idaho&lt;BR /&gt;sally has BugGers that are smaller&lt;BR /&gt;&lt;BR /&gt;Then you want to pick the third word out of file a&lt;BR /&gt;&lt;BR /&gt;cat filea | while read line &lt;BR /&gt;do&lt;BR /&gt;word=`awk '{print $3}' $line`&lt;BR /&gt;echo "Huggers $line"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;would output &lt;BR /&gt;Huggers buggers&lt;BR /&gt;Huggers BugGers&lt;BR /&gt;&lt;BR /&gt;Don't forget the shebang line is the first line of your script, and specifies the shell&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;she - bang    #!  - get it?  &lt;BR /&gt;(The exclamation point is the BANG, the pound sign is the comment shhhh)&lt;BR /&gt;&lt;BR /&gt;good luck</description>
      <pubDate>Tue, 05 Apr 2005 14:42:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894582#M402983</guid>
      <dc:creator>Jim Butler</dc:creator>
      <dc:date>2005-04-05T14:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: need help with shell scripting 101 class</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894583#M402984</link>
      <description>&amp;gt;&amp;gt; I want to 'hardcode' "Huggers " before whatever value is in file A, so that "Huggers " always preceeds the contents of File A and is written to File B.&lt;BR /&gt;&lt;BR /&gt;Ah! Clear:&lt;BR /&gt;&lt;BR /&gt;# cat &amp;gt; a&lt;BR /&gt;aap&lt;BR /&gt;noot&lt;BR /&gt;mies&lt;BR /&gt;# perl -ne 'print "Huggers $_"' a &amp;gt; b&lt;BR /&gt;# cat b&lt;BR /&gt;Huggers aap&lt;BR /&gt;Huggers noot&lt;BR /&gt;Huggers mies&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;# awk '{print "Huggers " $0}' a&lt;BR /&gt;Huggers aap&lt;BR /&gt;Huggers noot&lt;BR /&gt;Huggers mies&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hien.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Apr 2005 14:47:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894583#M402984</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-04-05T14:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: need help with shell scripting 101 class</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894584#M402985</link>
      <description>Thanks all for you participation.  It's obvious that there is more than one way to do things in Unix.&lt;BR /&gt;&lt;BR /&gt;It seems that I need to take a class in scripting and / or the command language.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Huggers Buggers</description>
      <pubDate>Tue, 05 Apr 2005 15:20:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-shell-scripting-101-class/m-p/4894584#M402985</guid>
      <dc:creator>Randy Hagedorn</dc:creator>
      <dc:date>2005-04-05T15:20:58Z</dc:date>
    </item>
  </channel>
</rss>

