请教关于编写一个shell命令的小.sh小程序
1个回答
展开全部
#!/bin/bash
while read X Y Z
do
filename=`printf $X$Y.inp`
touch $filename
echo "x line is $X" > $filename
echo "y line is $Y" >> $filename
echo "z line is $Z" >> $filename
./pro1.0 <$filename> ${filename/inp/out}
done < data.txt
while read X Y Z
do
filename=`printf $X$Y.inp`
touch $filename
echo "x line is $X" > $filename
echo "y line is $Y" >> $filename
echo "z line is $Z" >> $filename
./pro1.0 <$filename> ${filename/inp/out}
done < data.txt
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询