【发布时间】:2012-03-22 08:26:37
【问题描述】:
#!/bin/bash
file=debian.deb
test=basename $file .deb
DP="blah/blah/$test/$test.php"
read -p "[$DP]: " DPREPLY
DPREPLY=${DPREPLY:-$DP}
echo "Blah is set to $DPREPLY"
echo $DPREPLY>>testfile
所以我要做的是从变量文件中设置变量 test 并在文件 testfile 中使用它。
【问题讨论】:
标签: file bash variables debian