All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] dash doesn't report syntax error when it should on stray "fi"
@ 2012-04-23 16:53 Stefano Lattarini
  2012-04-23 17:03 ` Jonathan Nieder
  0 siblings, 1 reply; 9+ messages in thread
From: Stefano Lattarini @ 2012-04-23 16:53 UTC (permalink / raw)
  To: dash

How to reproduce:

  $ dash -c ':; fi'; echo stat = $?
  stat = 0

Behaviour of other shells:

  $ bash-4.1 -c ':; fi'; echo stat = $?  # Bash 4.1.5
  bash-4.1: -c: line 0: syntax error near unexpected token `fi'
  bash-4.1: -c: line 0: `:; fi'
  stat = 1

  $ bash-3.2 -c ':; fi'; echo stat = $? # Bash 3.2.0
  bash-3.2: -c: line 0: syntax error near unexpected token `fi'
  bash-3.2: -c: line 0: `:; fi'
  stat = 2

  $ ksh -c ':; fi'; echo stat = $? # AT&T Ksh
  ksh: syntax error at line 1: `fi' unexpected
  stat = 3

  $ pdksh -c ':; fi'; echo stat = $? # Public Domain Ksh, version 5.2.14
  pdksh: syntax error: `fi' unexpected
  stat = 1

  $ zsh -c ':; fi'; echo stat = $?  # Zsh 4.3.12
  zsh:1: parse error near `fi'
  stat = 1


Version information:

  $ dpkg -l dash
  ii   dash   0.5.5.1-7.4   POSIX-compliant shell

Regards,
  Stefano

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-04-24 22:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23 16:53 [BUG] dash doesn't report syntax error when it should on stray "fi" Stefano Lattarini
2012-04-23 17:03 ` Jonathan Nieder
2012-04-23 17:09   ` Stefano Lattarini
2012-04-23 19:27   ` Chet Ramey
2012-04-23 19:44     ` Jonathan Nieder
2012-04-23 19:48       ` Chet Ramey
2012-04-23 19:54         ` Jonathan Nieder
2012-04-24 22:47           ` Jilles Tjoelker
2012-04-23 19:53       ` Stefano Lattarini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.