<?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 Shell script: Brace expansion in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990286#M66477</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt; The following two brace expansion working differently. Can someone explain how this works?&lt;BR /&gt;&lt;BR /&gt;# echo {file1,file2}\ :{\ A," B",' C'}&lt;BR /&gt;file1 : A file1 : B file1 : C file2 : A file2 : B file2 : C&lt;BR /&gt;&lt;BR /&gt;# echo {file1,file2} :{\ A," B",' C'}&lt;BR /&gt;file1 file2 : A : B : C&lt;BR /&gt;&lt;BR /&gt;TIA.</description>
    <pubDate>Wed, 12 Jul 2006 02:21:51 GMT</pubDate>
    <dc:creator>SGK</dc:creator>
    <dc:date>2006-07-12T02:21:51Z</dc:date>
    <item>
      <title>Shell script: Brace expansion</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990286#M66477</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt; The following two brace expansion working differently. Can someone explain how this works?&lt;BR /&gt;&lt;BR /&gt;# echo {file1,file2}\ :{\ A," B",' C'}&lt;BR /&gt;file1 : A file1 : B file1 : C file2 : A file2 : B file2 : C&lt;BR /&gt;&lt;BR /&gt;# echo {file1,file2} :{\ A," B",' C'}&lt;BR /&gt;file1 file2 : A : B : C&lt;BR /&gt;&lt;BR /&gt;TIA.</description>
      <pubDate>Wed, 12 Jul 2006 02:21:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990286#M66477</guid>
      <dc:creator>SGK</dc:creator>
      <dc:date>2006-07-12T02:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script: Brace expansion</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990287#M66478</link>
      <description>I just tested both expressions and I have the same result. That is, both returns the same output:&lt;BR /&gt;&lt;BR /&gt;file1 : A file1 : B file1 : C file2 : A file2 : B file2 : C</description>
      <pubDate>Wed, 12 Jul 2006 08:43:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990287#M66478</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-07-12T08:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script: Brace expansion</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990288#M66479</link>
      <description>&lt;BR /&gt;Under which shell you tried?&lt;BR /&gt;&lt;BR /&gt;# echo $SHELL&lt;BR /&gt;/bin/bash&lt;BR /&gt;&lt;BR /&gt;# echo {file1,file2} :{\ A," B",' C'}&lt;BR /&gt;file1 file2 : A : B : C&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Jul 2006 22:16:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990288#M66479</guid>
      <dc:creator>SGK</dc:creator>
      <dc:date>2006-07-12T22:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script: Brace expansion</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990289#M66480</link>
      <description>&lt;!--!*#--&gt;&amp;gt;echo $SHELL&lt;BR /&gt;/bin/bash&lt;BR /&gt;&amp;gt; echo {file1,file2}\ :{\ A," B",' C'}&lt;BR /&gt;file1 : A file1 : B file1 : C file2 : A file2 : B file2 : C&lt;BR /&gt;&amp;gt;echo {file1,file2}\ :{\ A," B",' C'}&lt;BR /&gt;file1 : A file1 : B file1 : C file2 : A file2 : B file2 : C&lt;BR /&gt;&lt;BR /&gt;No differences?&lt;BR /&gt;&lt;BR /&gt;JP</description>
      <pubDate>Thu, 13 Jul 2006 00:38:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990289#M66480</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2006-07-13T00:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script: Brace expansion</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990290#M66481</link>
      <description>I get the same behavior as you did.&lt;BR /&gt;Use BASH shell on rhel4.2</description>
      <pubDate>Thu, 13 Jul 2006 01:01:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990290#M66481</guid>
      <dc:creator>Alexander Chuzhoy</dc:creator>
      <dc:date>2006-07-13T01:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script: Brace expansion</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990291#M66482</link>
      <description>Oops...&lt;BR /&gt;&lt;BR /&gt;&amp;gt;echo {file1,file2}\ :{\ A," B",' C'}&lt;BR /&gt;file1 : A file1 : B file1 : C file2 : A file2 : B file2 : C&lt;BR /&gt;&amp;gt;echo {file1,file2} :{\ A," B",' C'}&lt;BR /&gt;file1 file2 : A : B : C&lt;BR /&gt;&lt;BR /&gt;Difference in commands: the back-slash to escape the space before the colon.&lt;BR /&gt;Man page: &lt;BR /&gt;A  correctly-formed  brace  expansion must contain unquoted opening and closing braces, and at  least  one  unquoted  comma. Any  incorrectly formed  brace expansion is left unchanged. &lt;BR /&gt;I don't think that helps.&lt;BR /&gt;&lt;BR /&gt;If you escape the space with a backslash, the space is part of the string. If you do not escape the space, it is a separator and there is nothing to expand in the two separate brace lists...&lt;BR /&gt;&lt;BR /&gt;JP</description>
      <pubDate>Thu, 13 Jul 2006 01:05:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990291#M66482</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2006-07-13T01:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script: Brace expansion</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990292#M66483</link>
      <description>&lt;!--!*#--&gt;And also:&lt;BR /&gt;&lt;BR /&gt;echo {file1,file2}" : "{\ A," B",' C'}&lt;BR /&gt;file1 :  A file1 :  B file1 :  C file2 :  A file2 :  B file2 :  C&lt;BR /&gt;&lt;BR /&gt;JP</description>
      <pubDate>Thu, 13 Jul 2006 05:54:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990292#M66483</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2006-07-13T05:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script: Brace expansion</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990293#M66484</link>
      <description>Try this&lt;BR /&gt;&lt;BR /&gt;# echo {file1,file2}:{\ A," B",' C'}&lt;BR /&gt;&lt;BR /&gt;You should get the result below:&lt;BR /&gt;&lt;BR /&gt;file1: A file1: B file1: C file2: A file2: B file2: C&lt;BR /&gt;&lt;BR /&gt;Because of additional space in between of } and : , that why get the problem look like below:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;file1 file2 : A : B : C&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Jul 2006 23:39:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990293#M66484</guid>
      <dc:creator>Ryan Goh</dc:creator>
      <dc:date>2006-07-19T23:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Shell script: Brace expansion</title>
      <link>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990294#M66485</link>
      <description>Thanks all to clarify my doubts</description>
      <pubDate>Thu, 20 Jul 2006 00:00:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/shell-script-brace-expansion/m-p/4990294#M66485</guid>
      <dc:creator>SGK</dc:creator>
      <dc:date>2006-07-20T00:00:19Z</dc:date>
    </item>
  </channel>
</rss>

