<?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 Value interpretation issue in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995082#M100666</link>
    <description>A coworker of mine is having problems with this and I'm not grasping what the issue is either. The following command works when executed explicitly:&lt;BR /&gt;&lt;BR /&gt;omnidb -filesystem hostname.domain:/boot 'hostname.domain [/boot]'&lt;BR /&gt;&lt;BR /&gt;However, trying to use variables to handle a loop from a list of these parameters like:&lt;BR /&gt;&lt;BR /&gt;while read SYSNAME&lt;BR /&gt;do&lt;BR /&gt;  omnidb -filesystem ${SYSNAME}&lt;BR /&gt;done &amp;lt; /omni/fni/bin/ob_fs_list_tst.txt&lt;BR /&gt;&lt;BR /&gt;omnidb gives a usage synopsis so the value of the variable is not being interpretted in the same way as the explicit command above is even though the command looks the same (and can be copy/pasted to a command line and run successfully). I'm guessing it has something to do with the single quote around the last part of the string that is causing the issue, but we aren't seeing exactly how or how to get around it. Anyone with sharper eyes and brains this morning care to enlighten us?&lt;BR /&gt;&lt;BR /&gt;BTW, each line of the txt file looks like this:&lt;BR /&gt;&lt;BR /&gt;hostname.domain:/ 'hostname.domain [/]'</description>
    <pubDate>Thu, 03 Aug 2006 08:39:00 GMT</pubDate>
    <dc:creator>Jeff_Traigle</dc:creator>
    <dc:date>2006-08-03T08:39:00Z</dc:date>
    <item>
      <title>Value interpretation issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995082#M100666</link>
      <description>A coworker of mine is having problems with this and I'm not grasping what the issue is either. The following command works when executed explicitly:&lt;BR /&gt;&lt;BR /&gt;omnidb -filesystem hostname.domain:/boot 'hostname.domain [/boot]'&lt;BR /&gt;&lt;BR /&gt;However, trying to use variables to handle a loop from a list of these parameters like:&lt;BR /&gt;&lt;BR /&gt;while read SYSNAME&lt;BR /&gt;do&lt;BR /&gt;  omnidb -filesystem ${SYSNAME}&lt;BR /&gt;done &amp;lt; /omni/fni/bin/ob_fs_list_tst.txt&lt;BR /&gt;&lt;BR /&gt;omnidb gives a usage synopsis so the value of the variable is not being interpretted in the same way as the explicit command above is even though the command looks the same (and can be copy/pasted to a command line and run successfully). I'm guessing it has something to do with the single quote around the last part of the string that is causing the issue, but we aren't seeing exactly how or how to get around it. Anyone with sharper eyes and brains this morning care to enlighten us?&lt;BR /&gt;&lt;BR /&gt;BTW, each line of the txt file looks like this:&lt;BR /&gt;&lt;BR /&gt;hostname.domain:/ 'hostname.domain [/]'</description>
      <pubDate>Thu, 03 Aug 2006 08:39:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995082#M100666</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2006-08-03T08:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Value interpretation issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995083#M100667</link>
      <description>Have you tried escaping the single quotes in the text file?&lt;BR /&gt;&lt;BR /&gt;something like this:&lt;BR /&gt;&lt;BR /&gt;hostname.domain:/ \'hostname.domain [/]\'&lt;BR /&gt;&lt;BR /&gt;or what about quoting your variable&lt;BR /&gt;&lt;BR /&gt;omnidb -filesystem "${SYSNAME}"</description>
      <pubDate>Thu, 03 Aug 2006 08:48:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995083#M100667</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-08-03T08:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Value interpretation issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995084#M100668</link>
      <description>Jeff,&lt;BR /&gt;if,as you say, the command is correct and can be cut/pasted, I would re-direct the loop output into a file and then execute the file.&lt;BR /&gt;&lt;BR /&gt;I assume you had tried wrapping the ${SYSNAME} or even -filesystem ... in double quotes?</description>
      <pubDate>Thu, 03 Aug 2006 08:50:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995084#M100668</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-08-03T08:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Value interpretation issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995085#M100669</link>
      <description>Yeah. Quoting and escaping in various ways either broke things more or had no effect at all.&lt;BR /&gt;&lt;BR /&gt;Dumping the commands to a separate temporary script as Peter mentioned worked. Not quite as "clean" as we were going for, but, if it works, it works. :)</description>
      <pubDate>Thu, 03 Aug 2006 09:00:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995085#M100669</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2006-08-03T09:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Value interpretation issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995086#M100670</link>
      <description>If this works, you need to remove the quotes in the text file:&lt;BR /&gt;omnidb -filesystem hostname.domain:/boot 'hostname.domain [/boot]'&lt;BR /&gt;&lt;BR /&gt;When the shell sees the single quotes, it removes them and passes everything in them as one parm to omnidb.&lt;BR /&gt;&lt;BR /&gt;If omnidb needs them as one parm, you will have to use eval on $SYSNAME to get the quote working the right way?&lt;BR /&gt;&lt;BR /&gt;Doing the read is like&lt;BR /&gt;$ X="hhh.ddd:/ 'hhh.ddd [/boot]'"&lt;BR /&gt;&lt;BR /&gt;Trying to pass that to a command and get the quoted string parsed properly is an issue.&lt;BR /&gt;&lt;BR /&gt;$ printenv $X&lt;BR /&gt;the count is 4&lt;BR /&gt;hhh.ddd:/&lt;BR /&gt;'hhh.ddd&lt;BR /&gt;[/boot]'&lt;BR /&gt;&lt;BR /&gt;$ printenv "$X"&lt;BR /&gt;the count is 2&lt;BR /&gt;hhh.ddd:/ 'hhh.ddd [/boot]'&lt;BR /&gt;&lt;BR /&gt;And I assume you want this:&lt;BR /&gt;$ printenv hhh.ddd:/ 'hhh.ddd [/boot]'&lt;BR /&gt;the count is 3&lt;BR /&gt;hhh.ddd:/&lt;BR /&gt;hhh.ddd [/boot]&lt;BR /&gt;&lt;BR /&gt;The only solution I see it to rewrite your file like:&lt;BR /&gt;hhh.ddd:/|hhh.ddd [/boot]&lt;BR /&gt;&lt;BR /&gt;And change the read to:&lt;BR /&gt;$ IFS="|" read PARM1 PARM2&lt;BR /&gt;&lt;BR /&gt;Then $PARM1 and $PARM2 can be passed to  omnidb.</description>
      <pubDate>Thu, 03 Aug 2006 19:03:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995086#M100670</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2006-08-03T19:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Value interpretation issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995087#M100671</link>
      <description>I didn't try Dennis' suggestion. The file containing all of the system and directory information is the output from an omnidb command. Don't really care to hack around with that since Peter's suggestion got things working for us.</description>
      <pubDate>Mon, 07 Aug 2006 11:06:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/value-interpretation-issue/m-p/4995087#M100671</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2006-08-07T11:06:32Z</dc:date>
    </item>
  </channel>
</rss>

