假设我有一个文件file.txt,其中包含数据(比如'100').我想将此文件的内容读取到变量以供将来处理.我希望这适用于Linux和Solaris.我怎样才能做到这一点?
shell solaris sh
sh ×1
shell ×1
solaris ×1