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*

3
  • You shouldn't use function as a name of a function. It's a keyword in ksh, and some bourne-shell like bash, zsh, dash. Commented Aug 23, 2014 at 18:31
  • @Gnouc. Not in dash. In yash yes. Though zsh also accepts ksh's function definition syntax, function() echo x; function will work in zsh. So the only shells where that is a problem are ksh, bash and yash. Commented Aug 23, 2014 at 20:05
  • @StéphaneChazelas: Oh, I retry and it works in zsh, but dash doesn't. Commented Aug 23, 2014 at 20:13