<?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 scripting in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087339#M631219</link>
    <description>Hi,&lt;BR /&gt; &lt;BR /&gt;If you just want to see all the filesystems that are belong to a single volume group, and if you are mounting them in /etc/fstab, you could just use 'grep' to see all those entries for a particular volume group.&lt;BR /&gt; &lt;BR /&gt;Something like this might work:&lt;BR /&gt; &lt;BR /&gt;grep vghello /etc/fstab&lt;BR /&gt; &lt;BR /&gt;Of course, if you have vghello and vghello1 and vghello2, you might find all of them.  But it is a start.&lt;BR /&gt;&lt;BR /&gt;As Leif has mentioned, you can use the entries for the logical volumes in the volume group device directory to provide a list of logical volumes.  You could feed that to another command like 'bdf' and grab the output. &lt;BR /&gt;&lt;BR /&gt;I'm just curious, but why do you have to remove 200 filesystems? &lt;BR /&gt; &lt;BR /&gt;JP&lt;BR /&gt;</description>
    <pubDate>Tue, 07 Oct 2003 15:03:58 GMT</pubDate>
    <dc:creator>John Poff</dc:creator>
    <dc:date>2003-10-07T15:03:58Z</dc:date>
    <item>
      <title>need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087336#M631216</link>
      <description>I need to remove 200 filesystems and each of these filesystems or some belongs to a different volume group...how would I do use awk to have it print out for me just 1 particulatr vg like vghello and everythings belong to that vg</description>
      <pubDate>Tue, 07 Oct 2003 14:37:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087336#M631216</guid>
      <dc:creator>hpuxhelp</dc:creator>
      <dc:date>2003-10-07T14:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087337#M631217</link>
      <description>Hi,&lt;BR /&gt;I am not exact sure what you want do do, to list all logical volumes belonging to one group, try:&lt;BR /&gt;&lt;BR /&gt;ls /dev/vg00/lvol*&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Oct 2003 14:50:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087337#M631217</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-10-07T14:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087338#M631218</link>
      <description>I would not use awk.&lt;BR /&gt; &lt;BR /&gt;I would make a text file list of the following information:&lt;BR /&gt; &lt;BR /&gt;/dev/vg00/lvname1&lt;BR /&gt;/dev/vg09/lvname2&lt;BR /&gt;&lt;BR /&gt;call it input_file&lt;BR /&gt;&lt;BR /&gt;while read -r xx&lt;BR /&gt;do&lt;BR /&gt;  lvremove -f $xx&lt;BR /&gt;done &amp;lt; input_file&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;This script assumes the filesystem is already unmounted. If not, ask add second field space delimited.  The second field will be the filesystem name.&lt;BR /&gt;&lt;BR /&gt;Data is:&lt;BR /&gt; /dev/vg01/lvname1 /filesystemname&lt;BR /&gt; &lt;BR /&gt;Script is:&lt;BR /&gt; &lt;BR /&gt;while read -r xx yy&lt;BR /&gt;do&lt;BR /&gt;  umount $yy&lt;BR /&gt;  lvremove -f $xx&lt;BR /&gt;done &amp;lt; input_file&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;SEP</description>
      <pubDate>Tue, 07 Oct 2003 14:54:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087338#M631218</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-10-07T14:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087339#M631219</link>
      <description>Hi,&lt;BR /&gt; &lt;BR /&gt;If you just want to see all the filesystems that are belong to a single volume group, and if you are mounting them in /etc/fstab, you could just use 'grep' to see all those entries for a particular volume group.&lt;BR /&gt; &lt;BR /&gt;Something like this might work:&lt;BR /&gt; &lt;BR /&gt;grep vghello /etc/fstab&lt;BR /&gt; &lt;BR /&gt;Of course, if you have vghello and vghello1 and vghello2, you might find all of them.  But it is a start.&lt;BR /&gt;&lt;BR /&gt;As Leif has mentioned, you can use the entries for the logical volumes in the volume group device directory to provide a list of logical volumes.  You could feed that to another command like 'bdf' and grab the output. &lt;BR /&gt;&lt;BR /&gt;I'm just curious, but why do you have to remove 200 filesystems? &lt;BR /&gt; &lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Oct 2003 15:03:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087339#M631219</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2003-10-07T15:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087340#M631220</link>
      <description>ok, i was able to extract all the elmenents out such mnt point , and have it as text,&lt;BR /&gt;how do I use that text file to umount all fileystems that i have in tthat text file..&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;bc we no longer needs these</description>
      <pubDate>Tue, 07 Oct 2003 15:34:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087340#M631220</guid>
      <dc:creator>hpuxhelp</dc:creator>
      <dc:date>2003-10-07T15:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087341#M631221</link>
      <description>cat /dir/file | while read a b c d e f g h (* whatever, to end of line # of fields *)&lt;BR /&gt;do&lt;BR /&gt;   fuser -ku $MOUNT_PT_VAR (* &lt;BR /&gt;   umount $MOUNT_PT_VAR&lt;BR /&gt;   lvremove $LOG_VOL_VAR&lt;BR /&gt;done</description>
      <pubDate>Tue, 07 Oct 2003 16:02:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087341#M631221</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2003-10-07T16:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087342#M631222</link>
      <description>ok...it is not working... hm..&lt;BR /&gt;i had a file name test&lt;BR /&gt;cat test&lt;BR /&gt;/hello&lt;BR /&gt;/hi&lt;BR /&gt;/work&lt;BR /&gt;/etc....&lt;BR /&gt;&lt;BR /&gt;now, i want to umount all of these mnt point that currently in test..&lt;BR /&gt;how can i do that?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Oct 2003 16:20:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087342#M631222</guid>
      <dc:creator>hpuxhelp</dc:creator>
      <dc:date>2003-10-07T16:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087343#M631223</link>
      <description>cat test | while read a&lt;BR /&gt;do&lt;BR /&gt;   fuser -ku $a&lt;BR /&gt;   umount $a&lt;BR /&gt;done</description>
      <pubDate>Tue, 07 Oct 2003 16:25:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087343#M631223</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2003-10-07T16:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087344#M631224</link>
      <description>thank you mike...it works now...</description>
      <pubDate>Tue, 07 Oct 2003 16:33:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087344#M631224</guid>
      <dc:creator>hpuxhelp</dc:creator>
      <dc:date>2003-10-07T16:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087345#M631225</link>
      <description>one more question&lt;BR /&gt;if I hve something like this&lt;BR /&gt;hello#bye&lt;BR /&gt;and I want to remove # sign and add a space in between hello and bye ...&lt;BR /&gt;&lt;BR /&gt;I tried the cut command but it is not working/</description>
      <pubDate>Tue, 07 Oct 2003 17:29:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087345#M631225</guid>
      <dc:creator>hpuxhelp</dc:creator>
      <dc:date>2003-10-07T17:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: need help with scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087346#M631226</link>
      <description>couple of things &lt;BR /&gt;&lt;BR /&gt;echo "hello#there" | sed 's/#/ /g'&lt;BR /&gt;gives "hello there"&lt;BR /&gt;&lt;BR /&gt;and so does&lt;BR /&gt;echo "hello#there" | tr '#' ' '&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Oct 2003 20:14:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-help-with-scripting/m-p/3087346#M631226</guid>
      <dc:creator>Tom Ward_1</dc:creator>
      <dc:date>2003-10-07T20:14:13Z</dc:date>
    </item>
  </channel>
</rss>

