读书人

写一个最简略的shell程序 cd home/test

发布时间: 2013-04-21 21:18:07 作者: rapoo

写一个最简单的shell程序 cd home/test
新建了一个文件a,里面写了一句

cd home/a


保存退出后,在本目录下, ./a 想运行这个shell程序,但失败了

bash: ./a: Permission denied


怎么回事?
[解决办法]
#!/bin/bash
#This script is a test!
echo -n "Date and Time is:"
date
echo "The executable path is:"$PATH
echo "Your name is :`whoami`"
echo -n "Your current directory is:"
pwd
#end

读书人网 >UNIXLINUX

热点推荐