linux 将文件内容赋值给shell脚本中的变量: 1#!/bin/sh 2 maildir=baikewaringmail 3 lastVersion=xxxxxxxxxxxxxx/lastVersion/datestr.txt 4 mydatestr=`sed -n '1p' $lastVersion` 5 echo "the datestr is $mydatestr"