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 a variable. It is built into shells such as Bash.[1]

read
Operating systemUnix, Unix-like, Inferno
TypeCommand

Usage

The read command is used to take input from the user in shell scripts. It has a built in $REPLY variable for storing replies, but can save to other variables.[2]

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.[2]

References

🔥 Top keywords: Main PageSpecial:SearchPage 3Wikipedia:Featured picturesHouse of the DragonUEFA Euro 2024Bryson DeChambeauJuneteenthInside Out 2Eid al-AdhaCleopatraDeaths in 2024Merrily We Roll Along (musical)Jonathan GroffJude Bellingham.xxx77th Tony AwardsBridgertonGary PlauchéKylian MbappéDaniel RadcliffeUEFA European Championship2024 ICC Men's T20 World CupUnit 731The Boys (TV series)Rory McIlroyN'Golo KantéUEFA Euro 2020YouTubeRomelu LukakuOpinion polling for the 2024 United Kingdom general electionThe Boys season 4Romania national football teamNicola CoughlanStereophonic (play)Gene WilderErin DarkeAntoine GriezmannProject 2025