Site icon Bytefreaks.net

Bash: Read a file into a variable

Advertisements
value=$(<config.txt)

value is the variable to which you want to read the file into.

Replace config.txt with the file you want to be read.

This post is also available in: Greek

Exit mobile version