首先,在当前路径上建立test目录,mkdir test
在vi编辑器中输入date显示时间
同时输入I will try my best to learn C++
vi cpp.sh
date
echo I will try my best to learn C++
保存并退出wq
把cpp.sh
将cpp.sh移到新建的目录day01中
mv cpp.sh day01/
chmod a+x cpp.sh
执行
./cpp.sh
具体如下:
现在把cpp.sh放在test目录。即,
显示出来!