bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)


From: Steffen Nurpmeso
Subject: Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)
Date: Thu, 19 Sep 2024 00:45:44 +0200
User-agent: s-nail v14.9.25-608-ge479530e8d

Robert Elz wrote in
 <5996.1726697623@jacaranda.noi.kre.to>:
 |    Date:        Wed, 18 Sep 2024 23:05:06 +0200
 |    From:        Steffen Nurpmeso <steffen@sdaoden.eu>
 |    Message-ID:  <20240918210506.9rRUe2TG@steffen%sdaoden.eu>
 |
 || I am totally surprised they all swallow this code, there is no
 || separating whitespace in between the ; and the } which closes the
 || function -- isn't that invalid syntax even??
 |
 |';' is an operator, no white space needed to separate it from other
 |characters (unless the other characters would potentially form a
 |longer operator).

Woops.  I did not know that, i always separate {} at the beginning
an the end, yet not ().

  #?255|kent:steffen$ dash -c '{echo du;}'
  dash: 1: Syntax error: "}" unexpected

  #?2|kent:steffen$ dash -c '{ echo du;}'
  du

  #?0|kent:steffen$ bash -c '{echo du;}'
  bash: -c: line 1: syntax error near unexpected token `}'
  bash: -c: line 1: `{echo du;}'

  #?2|kent:steffen$ bash -c '{ echo du;}'
  du

 |kre
 --End of <5996.1726697623@jacaranda.noi.kre.to>

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]