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
  • What system are you using? FreeBSD's sh has the LINENO variable, so it certainly exists in some places... Commented Sep 28, 2012 at 16:32
  • Neither Ubuntu 12.04 nor Mint 13 seem to have it. Commented Sep 28, 2012 at 16:36
  • Yes, if sh is a link to bash then it will have most bash features. Commented Sep 28, 2012 at 17:21
  • 2
    On ubuntu sh is not bash but dash Commented Sep 28, 2012 at 18:39
  • 6
    You must be confusing with something else. No Linux has ever had a Bourne shell. There now exits ports of the Bourne shell to Linux, since the code of the Bourne shell has been released in the early 2000s, but it's only for historical interest as there's no point using the Bourne shell nowadays. POSIX specifies LINENO, so it should be present in any conforming (to POSIX, UNIX or LSB) "sh" which unfortunately doesn't include "dash" (there's a bug report on that) Commented Sep 28, 2012 at 21:30