What is the difference between `command a[bc]d` and `command `ab,cd`Quoting curly braces in the shellIs there a Unix command that searches for similar strings, based mostly on how they sound when spoken?Bash expansion of $@ as commandHow can I suppress the space between generated arguments during brace expansion?Brace expansion and compound commandGrep for word stem and print only word (and not line)Why doesn't systemctl restart,status sshd; work?Match lines between two patters using sed just onceExtract data between two patterns from a huge (forced) text fileLog the files found with the linux find and sed command

Noun clause (singular all the time?)

Meaning of Bloch representation

Does a semiconductor follow Ohm's law?

Can someone publish a story that happened to you?

Why do games have consumables?

Will tsunami waves travel forever if there was no land?

How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?

Is there a way to get a compiler for the original B programming language?

Apply MapThread to all but one variable

Why does academia still use scientific journals and not peer-reviewed government funded alternatives?

Critique of timeline aesthetic

Does holding a wand and speaking its command word count as V/S/M spell components?

A ​Note ​on ​N!

How to creep the reader out with what seems like a normal person?

How to stop co-workers from teasing me because I know Russian?

Pulling the rope with one hand is as heavy as with two hands?

What do the phrase "Reeyan's seacrest" and the word "fraggle" mean in a sketch?

How did Captain America manage to do this?

Fizzy, soft, pop and still drinks

Why is it that the natural deduction method can't test for invalidity?

How to have a sharp product image?

What are the potential pitfalls when using metals as a currency?

Rivers without rain

What is the relationship between spectral sequences and obstruction theory?



What is the difference between `command a[bc]d` and `command `ab,cd`


Quoting curly braces in the shellIs there a Unix command that searches for similar strings, based mostly on how they sound when spoken?Bash expansion of $@ as commandHow can I suppress the space between generated arguments during brace expansion?Brace expansion and compound commandGrep for word stem and print only word (and not line)Why doesn't systemctl restart,status sshd; work?Match lines between two patters using sed just onceExtract data between two patterns from a huge (forced) text fileLog the files found with the linux find and sed command






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















What is the difference between command a[bc]d and command ab,cd? Why do people use ab,cd when there is already a[bc]d?










share|improve this question






















  • Who told you to use command a[bc]d?

    – Jesse_b
    4 hours ago











  • It certainly has its uses if one understands it correctly.

    – Weijun Zhou
    4 hours ago






  • 1





    I guess I just don't understand how the confusion between the two happened.

    – Jesse_b
    4 hours ago











  • I have been explicitly asked by a coworker less familiar with Linux on this, although not recently.

    – Weijun Zhou
    4 hours ago


















1















What is the difference between command a[bc]d and command ab,cd? Why do people use ab,cd when there is already a[bc]d?










share|improve this question






















  • Who told you to use command a[bc]d?

    – Jesse_b
    4 hours ago











  • It certainly has its uses if one understands it correctly.

    – Weijun Zhou
    4 hours ago






  • 1





    I guess I just don't understand how the confusion between the two happened.

    – Jesse_b
    4 hours ago











  • I have been explicitly asked by a coworker less familiar with Linux on this, although not recently.

    – Weijun Zhou
    4 hours ago














1












1








1








What is the difference between command a[bc]d and command ab,cd? Why do people use ab,cd when there is already a[bc]d?










share|improve this question














What is the difference between command a[bc]d and command ab,cd? Why do people use ab,cd when there is already a[bc]d?







brace-expansion pattern-matching






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









Weijun ZhouWeijun Zhou

1,750427




1,750427












  • Who told you to use command a[bc]d?

    – Jesse_b
    4 hours ago











  • It certainly has its uses if one understands it correctly.

    – Weijun Zhou
    4 hours ago






  • 1





    I guess I just don't understand how the confusion between the two happened.

    – Jesse_b
    4 hours ago











  • I have been explicitly asked by a coworker less familiar with Linux on this, although not recently.

    – Weijun Zhou
    4 hours ago


















  • Who told you to use command a[bc]d?

    – Jesse_b
    4 hours ago











  • It certainly has its uses if one understands it correctly.

    – Weijun Zhou
    4 hours ago






  • 1





    I guess I just don't understand how the confusion between the two happened.

    – Jesse_b
    4 hours ago











  • I have been explicitly asked by a coworker less familiar with Linux on this, although not recently.

    – Weijun Zhou
    4 hours ago

















Who told you to use command a[bc]d?

– Jesse_b
4 hours ago





Who told you to use command a[bc]d?

– Jesse_b
4 hours ago













It certainly has its uses if one understands it correctly.

– Weijun Zhou
4 hours ago





It certainly has its uses if one understands it correctly.

– Weijun Zhou
4 hours ago




1




1





I guess I just don't understand how the confusion between the two happened.

– Jesse_b
4 hours ago





I guess I just don't understand how the confusion between the two happened.

– Jesse_b
4 hours ago













I have been explicitly asked by a coworker less familiar with Linux on this, although not recently.

– Weijun Zhou
4 hours ago






I have been explicitly asked by a coworker less familiar with Linux on this, although not recently.

– Weijun Zhou
4 hours ago











2 Answers
2






active

oldest

votes


















3














a[bc]d is a filename pattern. It will expand to abd and acd if those are names of existing files in the current directory. If abd exists, but acd does not, then it would only expand to abd, and vice versa. By default, the pattern would remain unexpanded if there was no matching filename.



ab,cd is a brace expansion (in shells that support these). It will expand to the two strings abd and acd. This is regardless of whether these strings corresponds to existing filenames or not.



If you are constructing strings, use a brace expansion. If you are matching filenames, use a filename pattern.






share|improve this answer

























  • Thank you for clarifying "If abd exists, but acd does not, then it would only expand to abd". I guess that is what is missing from my answer.

    – Weijun Zhou
    3 hours ago


















1














a[bc]d is pattern-matching, and is part of the POSIX standard. In POSIX, this is introduced as the "pattern bracket expression". It is documented in section 2.13 of the manual




When unquoted and outside a bracket expression, the following three
characters shall have special meaning in the specification of
patterns:

?

A question-mark is a pattern that shall match any character.

*

An asterisk is a pattern that shall match multiple characters, as
described in Patterns Matching Multiple Characters.

[

The open bracket shall introduce a pattern bracket expression.




Section 2.13.3 also mentions something that it behaves differently from what one would expect for usual regexs when it is used for filename expansion (emphasis by me)




The rules described so far in Patterns Matching a Single Character and
Patterns Matching Multiple Characters are qualified by the following
rules that apply when pattern matching notation is used for filename
expansion:



The slash character in a pathname shall be explicitly matched by using
one or more slashes in the pattern; it shall neither be matched by the
asterisk or question-mark special characters nor by a bracket
expression. Slashes in the pattern shall be identified before bracket
expressions;
thus, a slash cannot be included in a pattern bracket
expression used for filename expansion. If a slash character is found
following an unescaped open square bracket character before a
corresponding closing square bracket is found, the open bracket shall
be treated as an ordinary character. For example, the pattern
"a[b/c]d" does not match such pathnames as abd or a/d. It only matches
a pathname of literally a[b/c]d.




ab,cd is braces expansion, it is not in the specification by POSIX. Here is the corresponding part from the bash manual (emphasis by me):




Brace expansion is a mechanism by which arbitrary strings may be
generated. This mechanism is similar to filename expansion (see
Filename Expansion), but the filenames generated need not exist.
Patterns to be brace expanded take the form of an optional preamble,
followed by either a series of comma-separated strings or a sequence
expression between a pair of braces, followed by an optional
postscript. The preamble is prefixed to each string contained within
the braces, and the postscript is then appended to each resulting
string, expanding left to right.




According to the comment by @mosvy, this first appeared from csh but the behavior in bash is different from csh and other shells. This type of braces expansion is also present in glob(3).



There is another type of braces expansion a..z that only appeared after bash 3.0, and there are more added in bash 4.0.



In a shell where globbing is turned on, execute in a empty folder, the following result is returned



$ echo a[bc]d
a[bc]d
$ echo ab,cd
abd acd


In response to @Jesse_b's comment, if you are in an interactive shell and both of them applies, a[bc]d is less trouble typing. For example grep pattern [ab][12].txt.






share|improve this answer

























  • The brace expansion is not a "bashism"; it first appeared in csh, long before bash. It's also present in the glob(3) library function. The difference is that in bash it's performed before other expansions: a=A; ab=A/B; ac=A/C; echo $ab,c will work in bash differently from any other shell.

    – mosvy
    2 hours ago











  • Thank you. I will update the answer.

    – Weijun Zhou
    2 hours ago











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f515895%2fwhat-is-the-difference-between-command-abcd-and-command-ab-cd%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














a[bc]d is a filename pattern. It will expand to abd and acd if those are names of existing files in the current directory. If abd exists, but acd does not, then it would only expand to abd, and vice versa. By default, the pattern would remain unexpanded if there was no matching filename.



ab,cd is a brace expansion (in shells that support these). It will expand to the two strings abd and acd. This is regardless of whether these strings corresponds to existing filenames or not.



If you are constructing strings, use a brace expansion. If you are matching filenames, use a filename pattern.






share|improve this answer

























  • Thank you for clarifying "If abd exists, but acd does not, then it would only expand to abd". I guess that is what is missing from my answer.

    – Weijun Zhou
    3 hours ago















3














a[bc]d is a filename pattern. It will expand to abd and acd if those are names of existing files in the current directory. If abd exists, but acd does not, then it would only expand to abd, and vice versa. By default, the pattern would remain unexpanded if there was no matching filename.



ab,cd is a brace expansion (in shells that support these). It will expand to the two strings abd and acd. This is regardless of whether these strings corresponds to existing filenames or not.



If you are constructing strings, use a brace expansion. If you are matching filenames, use a filename pattern.






share|improve this answer

























  • Thank you for clarifying "If abd exists, but acd does not, then it would only expand to abd". I guess that is what is missing from my answer.

    – Weijun Zhou
    3 hours ago













3












3








3







a[bc]d is a filename pattern. It will expand to abd and acd if those are names of existing files in the current directory. If abd exists, but acd does not, then it would only expand to abd, and vice versa. By default, the pattern would remain unexpanded if there was no matching filename.



ab,cd is a brace expansion (in shells that support these). It will expand to the two strings abd and acd. This is regardless of whether these strings corresponds to existing filenames or not.



If you are constructing strings, use a brace expansion. If you are matching filenames, use a filename pattern.






share|improve this answer















a[bc]d is a filename pattern. It will expand to abd and acd if those are names of existing files in the current directory. If abd exists, but acd does not, then it would only expand to abd, and vice versa. By default, the pattern would remain unexpanded if there was no matching filename.



ab,cd is a brace expansion (in shells that support these). It will expand to the two strings abd and acd. This is regardless of whether these strings corresponds to existing filenames or not.



If you are constructing strings, use a brace expansion. If you are matching filenames, use a filename pattern.







share|improve this answer














share|improve this answer



share|improve this answer








edited 3 hours ago

























answered 3 hours ago









KusalanandaKusalananda

144k18268448




144k18268448












  • Thank you for clarifying "If abd exists, but acd does not, then it would only expand to abd". I guess that is what is missing from my answer.

    – Weijun Zhou
    3 hours ago

















  • Thank you for clarifying "If abd exists, but acd does not, then it would only expand to abd". I guess that is what is missing from my answer.

    – Weijun Zhou
    3 hours ago
















Thank you for clarifying "If abd exists, but acd does not, then it would only expand to abd". I guess that is what is missing from my answer.

– Weijun Zhou
3 hours ago





Thank you for clarifying "If abd exists, but acd does not, then it would only expand to abd". I guess that is what is missing from my answer.

– Weijun Zhou
3 hours ago













1














a[bc]d is pattern-matching, and is part of the POSIX standard. In POSIX, this is introduced as the "pattern bracket expression". It is documented in section 2.13 of the manual




When unquoted and outside a bracket expression, the following three
characters shall have special meaning in the specification of
patterns:

?

A question-mark is a pattern that shall match any character.

*

An asterisk is a pattern that shall match multiple characters, as
described in Patterns Matching Multiple Characters.

[

The open bracket shall introduce a pattern bracket expression.




Section 2.13.3 also mentions something that it behaves differently from what one would expect for usual regexs when it is used for filename expansion (emphasis by me)




The rules described so far in Patterns Matching a Single Character and
Patterns Matching Multiple Characters are qualified by the following
rules that apply when pattern matching notation is used for filename
expansion:



The slash character in a pathname shall be explicitly matched by using
one or more slashes in the pattern; it shall neither be matched by the
asterisk or question-mark special characters nor by a bracket
expression. Slashes in the pattern shall be identified before bracket
expressions;
thus, a slash cannot be included in a pattern bracket
expression used for filename expansion. If a slash character is found
following an unescaped open square bracket character before a
corresponding closing square bracket is found, the open bracket shall
be treated as an ordinary character. For example, the pattern
"a[b/c]d" does not match such pathnames as abd or a/d. It only matches
a pathname of literally a[b/c]d.




ab,cd is braces expansion, it is not in the specification by POSIX. Here is the corresponding part from the bash manual (emphasis by me):




Brace expansion is a mechanism by which arbitrary strings may be
generated. This mechanism is similar to filename expansion (see
Filename Expansion), but the filenames generated need not exist.
Patterns to be brace expanded take the form of an optional preamble,
followed by either a series of comma-separated strings or a sequence
expression between a pair of braces, followed by an optional
postscript. The preamble is prefixed to each string contained within
the braces, and the postscript is then appended to each resulting
string, expanding left to right.




According to the comment by @mosvy, this first appeared from csh but the behavior in bash is different from csh and other shells. This type of braces expansion is also present in glob(3).



There is another type of braces expansion a..z that only appeared after bash 3.0, and there are more added in bash 4.0.



In a shell where globbing is turned on, execute in a empty folder, the following result is returned



$ echo a[bc]d
a[bc]d
$ echo ab,cd
abd acd


In response to @Jesse_b's comment, if you are in an interactive shell and both of them applies, a[bc]d is less trouble typing. For example grep pattern [ab][12].txt.






share|improve this answer

























  • The brace expansion is not a "bashism"; it first appeared in csh, long before bash. It's also present in the glob(3) library function. The difference is that in bash it's performed before other expansions: a=A; ab=A/B; ac=A/C; echo $ab,c will work in bash differently from any other shell.

    – mosvy
    2 hours ago











  • Thank you. I will update the answer.

    – Weijun Zhou
    2 hours ago















1














a[bc]d is pattern-matching, and is part of the POSIX standard. In POSIX, this is introduced as the "pattern bracket expression". It is documented in section 2.13 of the manual




When unquoted and outside a bracket expression, the following three
characters shall have special meaning in the specification of
patterns:

?

A question-mark is a pattern that shall match any character.

*

An asterisk is a pattern that shall match multiple characters, as
described in Patterns Matching Multiple Characters.

[

The open bracket shall introduce a pattern bracket expression.




Section 2.13.3 also mentions something that it behaves differently from what one would expect for usual regexs when it is used for filename expansion (emphasis by me)




The rules described so far in Patterns Matching a Single Character and
Patterns Matching Multiple Characters are qualified by the following
rules that apply when pattern matching notation is used for filename
expansion:



The slash character in a pathname shall be explicitly matched by using
one or more slashes in the pattern; it shall neither be matched by the
asterisk or question-mark special characters nor by a bracket
expression. Slashes in the pattern shall be identified before bracket
expressions;
thus, a slash cannot be included in a pattern bracket
expression used for filename expansion. If a slash character is found
following an unescaped open square bracket character before a
corresponding closing square bracket is found, the open bracket shall
be treated as an ordinary character. For example, the pattern
"a[b/c]d" does not match such pathnames as abd or a/d. It only matches
a pathname of literally a[b/c]d.




ab,cd is braces expansion, it is not in the specification by POSIX. Here is the corresponding part from the bash manual (emphasis by me):




Brace expansion is a mechanism by which arbitrary strings may be
generated. This mechanism is similar to filename expansion (see
Filename Expansion), but the filenames generated need not exist.
Patterns to be brace expanded take the form of an optional preamble,
followed by either a series of comma-separated strings or a sequence
expression between a pair of braces, followed by an optional
postscript. The preamble is prefixed to each string contained within
the braces, and the postscript is then appended to each resulting
string, expanding left to right.




According to the comment by @mosvy, this first appeared from csh but the behavior in bash is different from csh and other shells. This type of braces expansion is also present in glob(3).



There is another type of braces expansion a..z that only appeared after bash 3.0, and there are more added in bash 4.0.



In a shell where globbing is turned on, execute in a empty folder, the following result is returned



$ echo a[bc]d
a[bc]d
$ echo ab,cd
abd acd


In response to @Jesse_b's comment, if you are in an interactive shell and both of them applies, a[bc]d is less trouble typing. For example grep pattern [ab][12].txt.






share|improve this answer

























  • The brace expansion is not a "bashism"; it first appeared in csh, long before bash. It's also present in the glob(3) library function. The difference is that in bash it's performed before other expansions: a=A; ab=A/B; ac=A/C; echo $ab,c will work in bash differently from any other shell.

    – mosvy
    2 hours ago











  • Thank you. I will update the answer.

    – Weijun Zhou
    2 hours ago













1












1








1







a[bc]d is pattern-matching, and is part of the POSIX standard. In POSIX, this is introduced as the "pattern bracket expression". It is documented in section 2.13 of the manual




When unquoted and outside a bracket expression, the following three
characters shall have special meaning in the specification of
patterns:

?

A question-mark is a pattern that shall match any character.

*

An asterisk is a pattern that shall match multiple characters, as
described in Patterns Matching Multiple Characters.

[

The open bracket shall introduce a pattern bracket expression.




Section 2.13.3 also mentions something that it behaves differently from what one would expect for usual regexs when it is used for filename expansion (emphasis by me)




The rules described so far in Patterns Matching a Single Character and
Patterns Matching Multiple Characters are qualified by the following
rules that apply when pattern matching notation is used for filename
expansion:



The slash character in a pathname shall be explicitly matched by using
one or more slashes in the pattern; it shall neither be matched by the
asterisk or question-mark special characters nor by a bracket
expression. Slashes in the pattern shall be identified before bracket
expressions;
thus, a slash cannot be included in a pattern bracket
expression used for filename expansion. If a slash character is found
following an unescaped open square bracket character before a
corresponding closing square bracket is found, the open bracket shall
be treated as an ordinary character. For example, the pattern
"a[b/c]d" does not match such pathnames as abd or a/d. It only matches
a pathname of literally a[b/c]d.




ab,cd is braces expansion, it is not in the specification by POSIX. Here is the corresponding part from the bash manual (emphasis by me):




Brace expansion is a mechanism by which arbitrary strings may be
generated. This mechanism is similar to filename expansion (see
Filename Expansion), but the filenames generated need not exist.
Patterns to be brace expanded take the form of an optional preamble,
followed by either a series of comma-separated strings or a sequence
expression between a pair of braces, followed by an optional
postscript. The preamble is prefixed to each string contained within
the braces, and the postscript is then appended to each resulting
string, expanding left to right.




According to the comment by @mosvy, this first appeared from csh but the behavior in bash is different from csh and other shells. This type of braces expansion is also present in glob(3).



There is another type of braces expansion a..z that only appeared after bash 3.0, and there are more added in bash 4.0.



In a shell where globbing is turned on, execute in a empty folder, the following result is returned



$ echo a[bc]d
a[bc]d
$ echo ab,cd
abd acd


In response to @Jesse_b's comment, if you are in an interactive shell and both of them applies, a[bc]d is less trouble typing. For example grep pattern [ab][12].txt.






share|improve this answer















a[bc]d is pattern-matching, and is part of the POSIX standard. In POSIX, this is introduced as the "pattern bracket expression". It is documented in section 2.13 of the manual




When unquoted and outside a bracket expression, the following three
characters shall have special meaning in the specification of
patterns:

?

A question-mark is a pattern that shall match any character.

*

An asterisk is a pattern that shall match multiple characters, as
described in Patterns Matching Multiple Characters.

[

The open bracket shall introduce a pattern bracket expression.




Section 2.13.3 also mentions something that it behaves differently from what one would expect for usual regexs when it is used for filename expansion (emphasis by me)




The rules described so far in Patterns Matching a Single Character and
Patterns Matching Multiple Characters are qualified by the following
rules that apply when pattern matching notation is used for filename
expansion:



The slash character in a pathname shall be explicitly matched by using
one or more slashes in the pattern; it shall neither be matched by the
asterisk or question-mark special characters nor by a bracket
expression. Slashes in the pattern shall be identified before bracket
expressions;
thus, a slash cannot be included in a pattern bracket
expression used for filename expansion. If a slash character is found
following an unescaped open square bracket character before a
corresponding closing square bracket is found, the open bracket shall
be treated as an ordinary character. For example, the pattern
"a[b/c]d" does not match such pathnames as abd or a/d. It only matches
a pathname of literally a[b/c]d.




ab,cd is braces expansion, it is not in the specification by POSIX. Here is the corresponding part from the bash manual (emphasis by me):




Brace expansion is a mechanism by which arbitrary strings may be
generated. This mechanism is similar to filename expansion (see
Filename Expansion), but the filenames generated need not exist.
Patterns to be brace expanded take the form of an optional preamble,
followed by either a series of comma-separated strings or a sequence
expression between a pair of braces, followed by an optional
postscript. The preamble is prefixed to each string contained within
the braces, and the postscript is then appended to each resulting
string, expanding left to right.




According to the comment by @mosvy, this first appeared from csh but the behavior in bash is different from csh and other shells. This type of braces expansion is also present in glob(3).



There is another type of braces expansion a..z that only appeared after bash 3.0, and there are more added in bash 4.0.



In a shell where globbing is turned on, execute in a empty folder, the following result is returned



$ echo a[bc]d
a[bc]d
$ echo ab,cd
abd acd


In response to @Jesse_b's comment, if you are in an interactive shell and both of them applies, a[bc]d is less trouble typing. For example grep pattern [ab][12].txt.







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 hours ago

























answered 4 hours ago









Weijun ZhouWeijun Zhou

1,750427




1,750427












  • The brace expansion is not a "bashism"; it first appeared in csh, long before bash. It's also present in the glob(3) library function. The difference is that in bash it's performed before other expansions: a=A; ab=A/B; ac=A/C; echo $ab,c will work in bash differently from any other shell.

    – mosvy
    2 hours ago











  • Thank you. I will update the answer.

    – Weijun Zhou
    2 hours ago

















  • The brace expansion is not a "bashism"; it first appeared in csh, long before bash. It's also present in the glob(3) library function. The difference is that in bash it's performed before other expansions: a=A; ab=A/B; ac=A/C; echo $ab,c will work in bash differently from any other shell.

    – mosvy
    2 hours ago











  • Thank you. I will update the answer.

    – Weijun Zhou
    2 hours ago
















The brace expansion is not a "bashism"; it first appeared in csh, long before bash. It's also present in the glob(3) library function. The difference is that in bash it's performed before other expansions: a=A; ab=A/B; ac=A/C; echo $ab,c will work in bash differently from any other shell.

– mosvy
2 hours ago





The brace expansion is not a "bashism"; it first appeared in csh, long before bash. It's also present in the glob(3) library function. The difference is that in bash it's performed before other expansions: a=A; ab=A/B; ac=A/C; echo $ab,c will work in bash differently from any other shell.

– mosvy
2 hours ago













Thank you. I will update the answer.

– Weijun Zhou
2 hours ago





Thank you. I will update the answer.

– Weijun Zhou
2 hours ago

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f515895%2fwhat-is-the-difference-between-command-abcd-and-command-ab-cd%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Are there any AGPL-style licences that require source code modifications to be public? Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Force derivative works to be publicAre there any GPL like licenses for Apple App Store?Do you violate the GPL if you provide source code that cannot be compiled?GPL - is it distribution to use libraries in an appliance loaned to customers?Distributing App for free which uses GPL'ed codeModifications of server software under GPL, with web/CLI interfaceDoes using an AGPLv3-licensed library prevent me from dual-licensing my own source code?Can I publish only select code under GPLv3 from a private project?Is there published precedent regarding the scope of covered work that uses AGPL software?If MIT licensed code links to GPL licensed code what should be the license of the resulting binary program?If I use a public API endpoint that has its source code licensed under AGPL in my app, do I need to disclose my source?

2013 GY136 Descoberta | Órbita | Referências Menu de navegação«List Of Centaurs and Scattered-Disk Objects»«List of Known Trans-Neptunian Objects»

Button changing it's text & action. Good or terrible? The 2019 Stack Overflow Developer Survey Results Are Inchanging text on user mouseoverShould certain functions be “hard to find” for powerusers to discover?Custom liking function - do I need user login?Using different checkbox style for different checkbox behaviorBest Practices: Save and Exit in Software UIInteraction with remote validated formMore efficient UI to progress the user through a complicated process?Designing a popup notice for a gameShould bulk-editing functions be hidden until a table row is selected, or is there a better solution?Is it bad practice to disable (replace) the context menu?