程序未按预期工作。有没有人可以帮助解决这个问题?未给出预期的输出
的外壳文件,即输入i -> abc.xml
预期成果是:grep abc $/nav/lab/xyz.lst
文件名:sample.sh
#!/bin/bash
echo "Enter the test name:"
read i
echo $i | set new_val = "`$cut -d '.' -f 1`"
echo $new_val
grep "`echo $a`" $/nav/lab/xyz.lst
读我 一个=“'回声$ I |切“-d”。 -f 1'“ echo”grep $ a /home/cg/root/nav.txt“ –
您的预期输出为shell命令吗? – Cristik