stdout -> shell variable Use backticks or $() in bash: echo "f1.h f2.h f3.h" > file.lst filelist=`cat file.lst` cat $filelist cat `cat file.lst` cat $(cat file.lst) Shell arithmetic (expr in Bourne, $(()) in bash): result=`expr 3 + 8 \* 2` result=$((expr 3 + 8 * 2))