Linux 读取文件中内容赋值给变量

var=$(cat somefile.txt)

echo ${var}

原文地址:https://www.cnblogs.com/shenckicc/p/7150872.html