Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • It seems to work for me. I tried both @ and * and it seems to produce the same result both the times. What shell you are using? Run echo $SHELL and paste the output to your question. Commented Jun 7, 2014 at 14:26
  • 1
    My example was wrong, this actually happens only with echo, not with printf, I just noticed. Commented Jun 7, 2014 at 14:36
  • 1
    possible duplicate of What is the difference between $* and $@? Commented Jun 7, 2014 at 17:13
  • 1
    @goldilocks The other question is about $* and $@. Though, the answer would be similar and one question could be considered a subset of the other, they are different questions. Commented Jun 7, 2014 at 19:31
  • 1
    printf and echo give the same result (tested on GNU bash, version 5.0.17), i.e., the difference between @ and * has nothing to do with the difference between printf and echo. Commented Aug 13, 2023 at 2:47