<?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: Variable manipulating in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239530#M173441</link>
    <description>echo /dev/dsk/c0t0d0 /cdrom cdfs ro,suid 0 0&lt;BR /&gt; | read v1 v2 v3 v4 v5 v6&lt;BR /&gt;&lt;BR /&gt;echo $v1&lt;BR /&gt;/dev/dsk/c0t0d0&lt;BR /&gt;&lt;BR /&gt;echo $v2&lt;BR /&gt;/cdrom&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jean-Luc</description>
    <pubDate>Mon, 05 Apr 2004 04:42:51 GMT</pubDate>
    <dc:creator>Jean-Luc Oudart</dc:creator>
    <dc:date>2004-04-05T04:42:51Z</dc:date>
    <item>
      <title>Variable manipulating</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239527#M173438</link>
      <description>I hope somebody can help me:&lt;BR /&gt;My Problem:&lt;BR /&gt;from a variable with this content:&lt;BR /&gt;/dev/dsk/c0t0d0 /cdrom cdfs ro,suid 0 0&lt;BR /&gt;i need the:&lt;BR /&gt;/dev/dsk/c0t0d0&lt;BR /&gt;and:&lt;BR /&gt;/cdrom&lt;BR /&gt;in to different variables.&lt;BR /&gt;How can i do this?&lt;BR /&gt;Thank you &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Apr 2004 04:21:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239527#M173438</guid>
      <dc:creator>Ralf Buchhold</dc:creator>
      <dc:date>2004-04-05T04:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Variable manipulating</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239528#M173439</link>
      <description>Hi,&lt;BR /&gt;# VAR1="dev/dsk/c0t0d0 /cdrom cdfs ro,suid 0 0"&lt;BR /&gt;&lt;BR /&gt;# DEV=$(echo $VAR1 | awk '{print $1}')&lt;BR /&gt;# echo $DEV&lt;BR /&gt;# CDR=$(echo $VAR1 | awk '{print $2}')&lt;BR /&gt;# echo $CDR&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Mon, 05 Apr 2004 04:28:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239528#M173439</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2004-04-05T04:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Variable manipulating</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239529#M173440</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Is that file containing only one line or multiple line&lt;BR /&gt;&lt;BR /&gt;here i am giving example for file containing one line.&lt;BR /&gt;*)to get /dev/dsk/c0t0d0:&lt;BR /&gt;     cut -f 1 -d " " &lt;FNAME&gt; &lt;BR /&gt;*)to get /cdrom&lt;BR /&gt;     cut -f 2 -d " " &lt;FNAME&gt;&lt;BR /&gt;&lt;BR /&gt;If u have more than one line use,&lt;BR /&gt;*) extract the line comes with cdrom&lt;BR /&gt;     cat &lt;FNAME&gt; | grep cdrom &amp;gt; &lt;TMPFILE&gt;&lt;BR /&gt;    And use above cut to get from tmpfile&lt;BR /&gt;&lt;BR /&gt;ALL THE BEST&lt;/TMPFILE&gt;&lt;/FNAME&gt;&lt;/FNAME&gt;&lt;/FNAME&gt;</description>
      <pubDate>Mon, 05 Apr 2004 04:38:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239529#M173440</guid>
      <dc:creator>SureshKumar_2</dc:creator>
      <dc:date>2004-04-05T04:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Variable manipulating</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239530#M173441</link>
      <description>echo /dev/dsk/c0t0d0 /cdrom cdfs ro,suid 0 0&lt;BR /&gt; | read v1 v2 v3 v4 v5 v6&lt;BR /&gt;&lt;BR /&gt;echo $v1&lt;BR /&gt;/dev/dsk/c0t0d0&lt;BR /&gt;&lt;BR /&gt;echo $v2&lt;BR /&gt;/cdrom&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Mon, 05 Apr 2004 04:42:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239530#M173441</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2004-04-05T04:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Variable manipulating</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239531#M173442</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Try this, if u want to extract Entire Col. &lt;BR /&gt;&lt;BR /&gt;for first col.&lt;BR /&gt;#cut -f 1 -d " " &lt;FNAME&gt; &lt;BR /&gt;&lt;BR /&gt;for 2nd col.&lt;BR /&gt;#cut -f 2 -d " " &lt;FNAME&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If u want to extract only Both col. use character count option in cut respectively.&lt;BR /&gt;&lt;BR /&gt;#cut -f 1,2 -d " " &lt;FNAME&gt;&lt;BR /&gt;&lt;BR /&gt;d option for delimitor.&lt;BR /&gt;f option for field&lt;/FNAME&gt;&lt;/FNAME&gt;&lt;/FNAME&gt;</description>
      <pubDate>Mon, 05 Apr 2004 04:45:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239531#M173442</guid>
      <dc:creator>SureshKumar_2</dc:creator>
      <dc:date>2004-04-05T04:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Variable manipulating</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239532#M173443</link>
      <description>echo $VAR |read VAR1 VAR2 VAR3 VAR4 VAR5 VAR6&lt;BR /&gt;&lt;BR /&gt;VAR1 ---- /dev/dsk/c0t0d0&lt;BR /&gt;VAR2 ---- /cdrom&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regds,&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Mon, 05 Apr 2004 05:02:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239532#M173443</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2004-04-05T05:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Variable manipulating</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239533#M173444</link>
      <description>Exam Question. Do the following way:&lt;BR /&gt;&lt;BR /&gt;var="/dev/dsk/c0t0d0 /cdrom cdfs ro,suid 0 0"&lt;BR /&gt;var1=`echo $var | cut -f1 -d " "`&lt;BR /&gt;var2=`echo $var | cut -f2 -d " "`&lt;BR /&gt;&lt;BR /&gt;echo $var1&lt;BR /&gt;echo $var2&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Mon, 05 Apr 2004 06:31:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239533#M173444</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-04-05T06:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Variable manipulating</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239534#M173445</link>
      <description>var="/dev/dsk/c0t0d0 /cdrom cdfs ro,suid 0 0"&lt;BR /&gt;echo $var | read var1 var2 trash&lt;BR /&gt;&lt;BR /&gt;echo $var1                      &lt;BR /&gt;/dev/dsk/c0t0d0&lt;BR /&gt;&lt;BR /&gt;echo $var2&lt;BR /&gt;/cdrom&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Apr 2004 06:37:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239534#M173445</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-04-05T06:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Variable manipulating</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239535#M173446</link>
      <description>ksh and posix shell can have array variables. So if you do the following-&lt;BR /&gt; &lt;BR /&gt;str="/dev/dsk/c0t0d0 /cdrom cdfs ro,suid 0 0"&lt;BR /&gt;set -A ary $str&lt;BR /&gt;dev=${ary[0]}&lt;BR /&gt;mnt=${ary[1]}&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 05 Apr 2004 08:52:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/variable-manipulating/m-p/3239535#M173446</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-04-05T08:52:58Z</dc:date>
    </item>
  </channel>
</rss>

