BashFAQ - Greg's Wiki
Contents How can I read a file (data stream, variable) line-by-line (and/or field-by-field)? How can I store the return value and/or output of a command in a variable? How can I find the latest (newest, earliest, oldest) file in a directory? How can I che...