<?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: how  to parse a list in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365038#M867091</link>
    <description>Hi Sachin,&lt;BR /&gt;&lt;BR /&gt;I'm not exactly sure if this is what you're asking, but you could always use the -p option of mkdir and it will create as many directories and subdirectories as you specify in a single command.  &lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;# ls /A&lt;BR /&gt;/A not found&lt;BR /&gt;&lt;BR /&gt;# mkdir -p /A/B/C/D/E/F/G&lt;BR /&gt;# ll /A/B/C/D/E/F&lt;BR /&gt;total 0&lt;BR /&gt;drwxrwxrwx   2 root       users           96 Aug 25 11:02 G&lt;BR /&gt;&lt;BR /&gt;So with one command I created an entire directory hierarchy, regardless of the number of subdirectories.&lt;BR /&gt;&lt;BR /&gt;Again, not sure if this is what you were looking for, but thought it might help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Dave</description>
    <pubDate>Wed, 25 Aug 2004 13:54:51 GMT</pubDate>
    <dc:creator>Dave Olker</dc:creator>
    <dc:date>2004-08-25T13:54:51Z</dc:date>
    <item>
      <title>how  to parse a list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365037#M867090</link>
      <description>Hi:&lt;BR /&gt;I am reading a path A/B/C/D/.... froma file .&lt;BR /&gt;and creating a directory srtucture starting with subdirectory C under my home (~me/C/D/...)&lt;BR /&gt;In this path, the number of subdirectories could vary . Is there any way I can check how many subdirectories are there under and create those direcotroes dynamically thru the script?</description>
      <pubDate>Wed, 25 Aug 2004 13:50:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365037#M867090</guid>
      <dc:creator>Sachin_29</dc:creator>
      <dc:date>2004-08-25T13:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: how  to parse a list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365038#M867091</link>
      <description>Hi Sachin,&lt;BR /&gt;&lt;BR /&gt;I'm not exactly sure if this is what you're asking, but you could always use the -p option of mkdir and it will create as many directories and subdirectories as you specify in a single command.  &lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;# ls /A&lt;BR /&gt;/A not found&lt;BR /&gt;&lt;BR /&gt;# mkdir -p /A/B/C/D/E/F/G&lt;BR /&gt;# ll /A/B/C/D/E/F&lt;BR /&gt;total 0&lt;BR /&gt;drwxrwxrwx   2 root       users           96 Aug 25 11:02 G&lt;BR /&gt;&lt;BR /&gt;So with one command I created an entire directory hierarchy, regardless of the number of subdirectories.&lt;BR /&gt;&lt;BR /&gt;Again, not sure if this is what you were looking for, but thought it might help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Wed, 25 Aug 2004 13:54:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365038#M867091</guid>
      <dc:creator>Dave Olker</dc:creator>
      <dc:date>2004-08-25T13:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: how  to parse a list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365039#M867092</link>
      <description>dave:&lt;BR /&gt;I am reading a path from a file in the file I have A/B/C/D in the file. from the file i have to read and create directories in my home.. hope i m not confusing</description>
      <pubDate>Wed, 25 Aug 2004 13:59:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365039#M867092</guid>
      <dc:creator>Sachin_29</dc:creator>
      <dc:date>2004-08-25T13:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: how  to parse a list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365040#M867093</link>
      <description>If you want to make a path of multiple directories it's symple us:&lt;BR /&gt;mkdir -p ~me/C/D/P/Z&lt;BR /&gt;&lt;BR /&gt;But if you like to know the nummer of directories that need to be created reading from the file you can use awk&lt;BR /&gt;&lt;BR /&gt;echo "A/B/C/D" | awk -F / '{print NF}'&lt;BR /&gt;&lt;BR /&gt;HTH (if I understand you correct?),&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Wed, 25 Aug 2004 14:00:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365040#M867093</guid>
      <dc:creator>Hoefnix</dc:creator>
      <dc:date>2004-08-25T14:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: how  to parse a list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365041#M867094</link>
      <description>If you need to strip off the "A/B/" and pick up the directory create at C, then&lt;BR /&gt; &lt;BR /&gt;$ x="A/B/C/D"&lt;BR /&gt;$ y=${x#A/B/}&lt;BR /&gt;$ echo $y&lt;BR /&gt;C/D&lt;BR /&gt;$ mkdir -p $y&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 25 Aug 2004 14:13:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365041#M867094</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-08-25T14:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: how  to parse a list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365042#M867095</link>
      <description>If you are looking to break the path apart, then you do the following under "ksh".&lt;BR /&gt; &lt;BR /&gt;$ IFS="/" ; b=A/B/C/D ; set -A a $b ; echo ${a[0]} ${#a[*]}&lt;BR /&gt; &lt;BR /&gt;This will print "A" (for ${a[0]}) and "4" (for ${#a[*], number of elements).&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 25 Aug 2004 14:45:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365042#M867095</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-08-25T14:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: how  to parse a list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365043#M867096</link>
      <description>Sachin,&lt;BR /&gt;&lt;BR /&gt;Assigning of points wouldn't offend any of us :-)&lt;BR /&gt; &lt;BR /&gt;...</description>
      <pubDate>Wed, 25 Aug 2004 14:48:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-parse-a-list/m-p/3365043#M867096</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-08-25T14:48:56Z</dc:date>
    </item>
  </channel>
</rss>

