Read (Unix)

read
Operating systemUnix, Unix-like, Inferno
TypeCommand

read is a command found on Unix and Unix-like operating systems such as Linux. It reads a line of input from standard input or a file passed as an argument to its -u flag, and assigns it to one or more variables. Each variable is assigned a successive token (word) from the input where tokens are normally split either by spaces or tabs. If there are more variables than tokens then the remaining variables are unchanged. If there are more tokens than variable then the remaining tokens are assigned to the last variable listed in the command.[1] If the -a flag is used all of the tokens are loaded as separate items into the 1st argument as an array. It is built into shells such as Bash.[2]

  1. ^ Dancuk, Milica (Feb 21, 2022). "How To Use The Bash read Command". phoenixnap.com. phoenixNAP Global IT Services. Retrieved Mar 31, 2025.
  2. ^ "Guide to the Linux read Command". Baeldung. 2023-06-08. Retrieved 2025-03-31.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search