Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

71%
+3 −0
Q&A How can I get "help" with vanilla sh builtins?

I discovered that the -s flag for read is a Bash-ism: $ bash -c 'read -s -n 1' # waits until I press a key $ sh -c 'read -s -n 1' sh: 1: read: Illegal option -s Vanilla sh does offer read: ...

1 answer  ·  posted 1y ago by Karl Knechtel‭  ·  last activity 1y ago by Michael‭

Question shell-scripting man-page sh
#1: Initial revision by user avatar Karl Knechtel‭ · 2025-06-26T00:37:55Z (about 1 year ago)
How can I get "help" with vanilla sh builtins?
I discovered that the `-s` flag for `read` is a Bash-ism:

```
$ bash -c 'read -s -n 1' # waits until I press a key

$ sh -c 'read -s -n 1'
sh: 1: read: Illegal option -s
```

Vanilla `sh` does offer `read`:

```
$ sh -c 'type read'
read is a shell builtin
```

But I can't read `help` for the vanilla version:

```
$ help read # shows help for the Bash version
$ sh -c 'help read'
sh: 1: help: not found
$ man read # can only find the C system call, regardless of shell
```

This is *not* about the actual use of `read`. Rather: how can I read the manual properly?