GO-V.ORG
As seen in

Read (Unix)

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. 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. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

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. 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. ==Configuration== The command supports several options via flags. It can be configured to issue a message using -p instead of needing to use the echo command. It can also superficially hide text using the -s flag, limit the amount of characters with -n, store the result in an array with -a, and timeout after a certain amount of time with -t. The -e flag tells read to use the GNU readline library to handle the input. The -i arguments flag, which can only be used with -e, supplies a default input string which the user can then accept or modify. ==References==

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Read (Unix)". 1791242255. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1378755601

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·