<?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 With one word is o.k., with more than 1 word is not ok !!! in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948669#M103205</link>
    <description>Hi..&lt;BR /&gt;i'm doing a script which is going to verify when a process is down.&lt;BR /&gt;All proceses are in a file called PROCESOS.txt, it was crated whit result of:&lt;BR /&gt;ps -fea &amp;gt; PROCESOS.txt&lt;BR /&gt;&lt;BR /&gt;now, when a process is only 1 word there is no problem and this word is kept in a variable named "proceso" but when are more than 1 it can not to keep the words in the variable proceso , i'm attaching images about script and the run&lt;BR /&gt;where it says " el valor de fin es 11" you can see when "k vale 9" is not doing things (echo commands) progrramated in script.&lt;BR /&gt;My doubt is ,why can not all words in variable proceso ? &lt;BR /&gt;&lt;BR /&gt;Thanks, Manuales.</description>
    <pubDate>Fri, 23 Dec 2005 12:03:50 GMT</pubDate>
    <dc:creator>Manuales</dc:creator>
    <dc:date>2005-12-23T12:03:50Z</dc:date>
    <item>
      <title>With one word is o.k., with more than 1 word is not ok !!!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948669#M103205</link>
      <description>Hi..&lt;BR /&gt;i'm doing a script which is going to verify when a process is down.&lt;BR /&gt;All proceses are in a file called PROCESOS.txt, it was crated whit result of:&lt;BR /&gt;ps -fea &amp;gt; PROCESOS.txt&lt;BR /&gt;&lt;BR /&gt;now, when a process is only 1 word there is no problem and this word is kept in a variable named "proceso" but when are more than 1 it can not to keep the words in the variable proceso , i'm attaching images about script and the run&lt;BR /&gt;where it says " el valor de fin es 11" you can see when "k vale 9" is not doing things (echo commands) progrramated in script.&lt;BR /&gt;My doubt is ,why can not all words in variable proceso ? &lt;BR /&gt;&lt;BR /&gt;Thanks, Manuales.</description>
      <pubDate>Fri, 23 Dec 2005 12:03:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948669#M103205</guid>
      <dc:creator>Manuales</dc:creator>
      <dc:date>2005-12-23T12:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: With one word is o.k., with more than 1 word is not ok !!!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948670#M103206</link>
      <description>I can't open your attachment so I'm guessing that you are assigning the lines of text from PROCESOS.txt to a variable and you're probably not using quotes, so you're only getting the first word of the line.  Try using quotes.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 23 Dec 2005 12:22:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948670#M103206</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-12-23T12:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: With one word is o.k., with more than 1 word is not ok !!!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948671#M103207</link>
      <description>Thanks Pete,i have alredy found the solution:&lt;BR /&gt;&lt;BR /&gt;before:&lt;BR /&gt;"fin" variable cold be 10 or more than 10&lt;BR /&gt;....&lt;BR /&gt;....&lt;BR /&gt;  fin=$(echo $proc | wc -w )&lt;BR /&gt;.....&lt;BR /&gt;.....&lt;BR /&gt;case $m in&lt;BR /&gt;[9-$fin])....&lt;BR /&gt;...... ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;After:&lt;BR /&gt;  fin=$(echo $proc | wc -w | cut -c1)&lt;BR /&gt;  fin2=$(echo $proc | wc -w | cut -c2)&lt;BR /&gt;....&lt;BR /&gt;....&lt;BR /&gt;case $m in&lt;BR /&gt;9 | $fin[0-$fin2])...&lt;BR /&gt;....&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;That was the solution !!!&lt;BR /&gt;i was using other sintax with case comand ...&lt;BR /&gt;&lt;BR /&gt;Thanks, Manuales.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Dec 2005 12:35:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948671#M103207</guid>
      <dc:creator>Manuales</dc:creator>
      <dc:date>2005-12-23T12:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: With one word is o.k., with more than 1 word is not ok !!!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948672#M103208</link>
      <description>thanks !!!</description>
      <pubDate>Fri, 23 Dec 2005 12:36:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948672#M103208</guid>
      <dc:creator>Manuales</dc:creator>
      <dc:date>2005-12-23T12:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: With one word is o.k., with more than 1 word is not ok !!!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948673#M103209</link>
      <description>Can you post your script here and not in the attachment.  And what is the end result you are trying to do ?  &lt;BR /&gt;&lt;BR /&gt;Input: take in the command and all the arguments and save into a file.&lt;BR /&gt;&lt;BR /&gt;Output:  ??&lt;BR /&gt;&lt;BR /&gt;you can try the "x" option to ps -efx&lt;BR /&gt;which shows all of the process arguments and options.</description>
      <pubDate>Fri, 23 Dec 2005 12:40:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948673#M103209</guid>
      <dc:creator>D Block 2</dc:creator>
      <dc:date>2005-12-23T12:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: With one word is o.k., with more than 1 word is not ok !!!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948674#M103210</link>
      <description>Hi Tom when i finish with script i'll atach it, probably it interest to you .. o.k.??&lt;BR /&gt;&lt;BR /&gt;Do you have any mail to email it to you ???&lt;BR /&gt;Manuales.</description>
      <pubDate>Fri, 23 Dec 2005 13:56:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948674#M103210</guid>
      <dc:creator>Manuales</dc:creator>
      <dc:date>2005-12-23T13:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: With one word is o.k., with more than 1 word is not ok !!!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948675#M103211</link>
      <description>case in shell&lt;BR /&gt;nice job.</description>
      <pubDate>Fri, 23 Dec 2005 23:22:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948675#M103211</guid>
      <dc:creator>D Block 2</dc:creator>
      <dc:date>2005-12-23T23:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: With one word is o.k., with more than 1 word is not ok !!!</title>
      <link>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948676#M103212</link>
      <description>case statements can be very tricky.. wish you the best..</description>
      <pubDate>Fri, 23 Dec 2005 23:23:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/with-one-word-is-o-k-with-more-than-1-word-is-not-ok/m-p/4948676#M103212</guid>
      <dc:creator>D Block 2</dc:creator>
      <dc:date>2005-12-23T23:23:56Z</dc:date>
    </item>
  </channel>
</rss>

