<?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: word splitting in shell in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935353#M720104</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;'cut' will do here:&lt;BR /&gt;&lt;BR /&gt;# VAR=`echo ${lv}}cut -f3 -d/`&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 25 Mar 2003 16:55:17 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2003-03-25T16:55:17Z</dc:date>
    <item>
      <title>word splitting in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935349#M720100</link>
      <description>Hi, can u please somebody tell how to split the word.&lt;BR /&gt;&lt;BR /&gt;I wrote a shell script like this&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;lv=`bdf |grep /var/opt/nokia |awk '{print $1}'`&lt;BR /&gt;&lt;BR /&gt;In the lv variable I will get some string like "/dev/vg01/lvol2", from this string i have get "vg01" to some other variable.&lt;BR /&gt;&lt;BR /&gt;If is is silly, please don't laugh on me because i am new to shell programming (:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Mar 2003 16:46:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935349#M720100</guid>
      <dc:creator>Kourla</dc:creator>
      <dc:date>2003-03-25T16:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: word splitting in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935350#M720101</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Use the seperator "FS" to achieve what you want. For ex., if you want to get only the Logical volume, you would do&lt;BR /&gt;&lt;BR /&gt;bdf |grep /var/opt/nokia |awk '{print $1}'|awk '{FS="/";print $4}'&lt;BR /&gt;&lt;BR /&gt;Use 'df' instead of 'bdf'. If your lvol name is too long, then you may not get what you want.&lt;BR /&gt;&lt;BR /&gt;If you df, you should grep for the second column and then filerout what you want using the above logic.&lt;BR /&gt; &lt;BR /&gt;-Sri</description>
      <pubDate>Tue, 25 Mar 2003 16:53:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935350#M720101</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2003-03-25T16:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: word splitting in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935351#M720102</link>
      <description>Hi (Again),&lt;BR /&gt;&lt;BR /&gt;BTW, if you want to get 'vg01' out of it, you will use '{FS="/";print $3}'&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Tue, 25 Mar 2003 16:54:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935351#M720102</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2003-03-25T16:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: word splitting in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935352#M720103</link>
      <description>Hi Kourla,&lt;BR /&gt;&lt;BR /&gt;Try this&lt;BR /&gt;&lt;BR /&gt;bdf |grep /var/opt/nokia | cut -f 3 -d "/"&lt;BR /&gt;&lt;BR /&gt;This should yield the VG name w/o having to awk. Of course, you could assign the output to a var.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Tue, 25 Mar 2003 16:54:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935352#M720103</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-03-25T16:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: word splitting in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935353#M720104</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;'cut' will do here:&lt;BR /&gt;&lt;BR /&gt;# VAR=`echo ${lv}}cut -f3 -d/`&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 25 Mar 2003 16:55:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935353#M720104</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-03-25T16:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: word splitting in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935354#M720105</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;bdf |grep /var/opt/nokia |awk '{FS="/";print $3}'&lt;BR /&gt;&lt;BR /&gt;Robert-Jan.</description>
      <pubDate>Tue, 25 Mar 2003 16:59:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935354#M720105</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2003-03-25T16:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: word splitting in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935355#M720106</link>
      <description>I like using shell built-ins, especially for scripts that run frequently. fork/exec is expensive... and things sum up.&lt;BR /&gt;&lt;BR /&gt;vg=${lv#/dev/}&amp;amp;&amp;amp; vg=${vg%/*}&lt;BR /&gt;&lt;BR /&gt;Best regards...&lt;BR /&gt; Dietmar.</description>
      <pubDate>Tue, 25 Mar 2003 17:11:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935355#M720106</guid>
      <dc:creator>Dietmar Konermann</dc:creator>
      <dc:date>2003-03-25T17:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: word splitting in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935356#M720107</link>
      <description>Nobody suggested split:&lt;BR /&gt;&lt;BR /&gt;Instead of print $1, use split($1, arg, "/"]);print arg[3]&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Apr 2003 15:26:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935356#M720107</guid>
      <dc:creator>Al Langen_1</dc:creator>
      <dc:date>2003-04-04T15:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: word splitting in shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935357#M720108</link>
      <description>Al,&lt;BR /&gt;&lt;BR /&gt;split works well, another way would be &lt;BR /&gt;&lt;BR /&gt;lv=$(bdf | grep /var/opt/nokia | awk -F/ '{print $1}')&lt;BR /&gt;&lt;BR /&gt;6 ways to skin a cat :o)</description>
      <pubDate>Wed, 16 Apr 2003 00:43:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/word-splitting-in-shell/m-p/2935357#M720108</guid>
      <dc:creator>Donny Jekels</dc:creator>
      <dc:date>2003-04-16T00:43:35Z</dc:date>
    </item>
  </channel>
</rss>

