#547906 dash: 'read' builtin reads only the first character from pipes or /proc files

Package:
dash
Source:
dash
Description:
POSIX-compliant shell
Submitter:
Corin Langosch
Date:
2023-07-15 07:57:06 UTC
Severity:
important
Tags:
#547906#5
Date:
2009-09-22 13:59:45 UTC
From:
To:
The 'read' command seems to only read the first character and not the whole line.

Example / comparison with bash:

# /bin/dash
# read MAX </proc/sys/net/netfilter/nf_conntrack_max
# echo $MAX
2

# /bin/bash
# read MAX </proc/sys/net/netfilter/nf_conntrack_max
# echo $MAX
262144