<?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: Shell problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695554#M843071</link>
    <description>You can do spaces, but it's not a good idea because of parsing rules.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# mkdir "this is stupid"&lt;BR /&gt;# ls -l | grep this&lt;BR /&gt;drwxrwxrwx   2 root       sys             96 Apr  2 14:05 this is stupid&lt;BR /&gt;# &lt;BR /&gt;&lt;BR /&gt;put filename in QUOTES&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
    <pubDate>Tue, 02 Apr 2002 19:06:17 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2002-04-02T19:06:17Z</dc:date>
    <item>
      <title>Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695552#M843069</link>
      <description>I met a problem.&lt;BR /&gt;I have a file named ss&lt;BR /&gt;ss:&lt;BR /&gt;consulting&lt;BR /&gt;Global Exotica - DEVADM&lt;BR /&gt;Global Exotica - DEVSTD&lt;BR /&gt;NSD&lt;BR /&gt;&lt;BR /&gt;My question:&lt;BR /&gt;for dirname in `cat ss`&lt;BR /&gt;do&lt;BR /&gt;   echo "$dirname"&lt;BR /&gt;   mkdir "$dirname"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;I cannot get the dirname "Global Exotica - DEVADM" and Global Exotica - DEVSTD" because of the space&lt;BR /&gt;&lt;BR /&gt;Hope I can get feedback&lt;BR /&gt;very appreciated advance&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Apr 2002 18:59:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695552#M843069</guid>
      <dc:creator>Catherine_3</dc:creator>
      <dc:date>2002-04-02T18:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695553#M843070</link>
      <description>I can suggest getting rid of the spaces in file "ss". For example ..&lt;BR /&gt;&lt;BR /&gt;# sed 's/ //g' ss &amp;gt; ss.new&lt;BR /&gt;&lt;BR /&gt;The "ss.new" file would then looked like ..&lt;BR /&gt;&lt;BR /&gt;consulting &lt;BR /&gt;GlobalExotica-DEVADM &lt;BR /&gt;GlobalExotica-DEVSTD &lt;BR /&gt;NSD&lt;BR /&gt;&lt;BR /&gt;Now run it through the for loop.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Apr 2002 19:04:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695553#M843070</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-04-02T19:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695554#M843071</link>
      <description>You can do spaces, but it's not a good idea because of parsing rules.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# mkdir "this is stupid"&lt;BR /&gt;# ls -l | grep this&lt;BR /&gt;drwxrwxrwx   2 root       sys             96 Apr  2 14:05 this is stupid&lt;BR /&gt;# &lt;BR /&gt;&lt;BR /&gt;put filename in QUOTES&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 02 Apr 2002 19:06:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695554#M843071</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-04-02T19:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695555#M843072</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can change all space by a _.&lt;BR /&gt;&lt;BR /&gt;cat ss | sed s/" "/_/g &amp;gt;! ss.new&lt;BR /&gt;&lt;BR /&gt;Frank.</description>
      <pubDate>Tue, 02 Apr 2002 19:07:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695555#M843072</guid>
      <dc:creator>Francois Bariselle_3</dc:creator>
      <dc:date>2002-04-02T19:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695556#M843073</link>
      <description>change the FS (field separator) variable to just use linefeeds:&lt;BR /&gt;&lt;BR /&gt;OLD_FS=$FS&lt;BR /&gt;FS=`echo "\n"`&lt;BR /&gt;for...&lt;BR /&gt;...&lt;BR /&gt;done&lt;BR /&gt;FS=$OLD_FS&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;mark</description>
      <pubDate>Tue, 02 Apr 2002 19:10:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695556#M843073</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2002-04-02T19:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695557#M843074</link>
      <description>You can do this&lt;BR /&gt;&lt;BR /&gt;for dirname in `cat ss` &lt;BR /&gt;do &lt;BR /&gt;echo "$dirname" &lt;BR /&gt;mkdir "${dirname}" &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;Sachin&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Apr 2002 19:10:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695557#M843074</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2002-04-02T19:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695558#M843075</link>
      <description>Use read instead of for.  Since you have multiple variables on an input line, read will place the entire line in dirname.&lt;BR /&gt;&lt;BR /&gt;while read dirname&lt;BR /&gt;do&lt;BR /&gt;echo $dirname&lt;BR /&gt;mkdir "$dirname"&lt;BR /&gt;done &lt;SS&gt;&lt;/SS&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Tue, 02 Apr 2002 19:32:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695558#M843075</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-04-02T19:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695559#M843076</link>
      <description>Hi guys,&lt;BR /&gt;Thanks a lot&lt;BR /&gt;my question is I can't get dirname from ss&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Apr 2002 19:39:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695559#M843076</guid>
      <dc:creator>Catherine_3</dc:creator>
      <dc:date>2002-04-02T19:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695560#M843077</link>
      <description>Hi&lt;BR /&gt;Try this&lt;BR /&gt;ss: &lt;BR /&gt;"consulting "&lt;BR /&gt;"Global Exotica - DEVADM "&lt;BR /&gt;"Global Exotica - DEVSTD "&lt;BR /&gt;"NSD "&lt;BR /&gt;&lt;BR /&gt;Add "" in file ss and then&lt;BR /&gt;&lt;BR /&gt;#cat ss |xargs mkdir&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Prashant.&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Apr 2002 19:51:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695560#M843077</guid>
      <dc:creator>Deshpande Prashant</dc:creator>
      <dc:date>2002-04-02T19:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695561#M843078</link>
      <description>This will work I have try it&lt;BR /&gt;&lt;BR /&gt;cat ss | while read line;      &lt;BR /&gt;do&lt;BR /&gt; echo $line&lt;BR /&gt; mkdir ${line}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Sachin Patel&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Apr 2002 19:56:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695561#M843078</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2002-04-02T19:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Shell problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695562#M843079</link>
      <description>Hi Catherine,&lt;BR /&gt;&lt;BR /&gt;Did you try the "while read dirname" loop?  For each line of ss, $dirname will contain the entire line, spaces and all and it will create the directories with names like "Global Exotica - DEVADM".&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Tue, 02 Apr 2002 19:59:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-problem/m-p/2695562#M843079</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-04-02T19:59:16Z</dc:date>
    </item>
  </channel>
</rss>

