我的剧本
#!/bin/bash
for i in *_TEx_*.dat;
do
file1=$i
done
for i in *_TEy_*.dat;
do
file2=$i
done
echo file1="$file1"
echo file2="$file2"
awk '$0+0 == $0 { printf "%.3f\n", $0 / .05 }' "$file1" > ex65536.dat
awk '$0+0 == $0 { printf "%.3f\n", $0 / .05 }' "$file2" > ey65536.dat
mv *.dat /home/milenko/birrp
mycd() {
cd /home/milenko/birrp
}
mycd
但是
milenko@milenko-HP-Compaq-6830s:~/procmt$ pwd
/home/milenko/procmt
我的更改工作目录的说明有什么问题?
答案 0 :(得分:1)
尝试
...
mycd() {
cd /home/milenko/birrp
exec /bin/bash
}
mycd
或运行您的脚本如下;
. ./yourscript.sh