Say I have some configuration data in a file config. For convenience, I'd like to load this data into a shell variable, CONFIG_DATA.
Obviously I can do:
CONFIG_DATA="$(cat config)" But this kinda feels like a useless use of cat to me. Is this the only way to do this? Or is there a more elegant way to do it?
Answers should prefer POSIX but may use any shell.