ls -al
bashroot@momen-PC:/home# ls -al total 28 drwxr-xr-x 2 root root 4096 Mar 26 18:02 . drwxr-xr-x 19 root root 4096 Mar 25 23:34 .. -rw-r--r-- 1 root root 12288 Mar 21 22:20 .myfile.swp -rw-r--r-- 1 root root 49 Mar 21 22:20 myfile -rw-r--r-- 1 root root 0 Mar 21 20:23 test.log -rw-r--r-- 1 root root 27 Mar 26 18:02 test.sh
chmod +x
bash-rwxr-xr-x 1 root root 27 Mar 26 18:02 test.sh
输入
bashcat >text.txt
将内容输入后会在text.txt中保存
或者另一种方式
bashecho "12345"> text.txt
ps
使用>>会将字符串跟在后面
使用#
也可以使用注释多行
bash: ' 注释 注释 注释 注释 '
bashcat<<相同的开始与结束 xxxxx xxxxxxxx xxxx 相同的开始与结束
bash#! /bin/bash count=10 #s设置变量count=10 if [ $count -eq 10 ] #-eq equals /-ne not equals then echo "等" else echo "不等" fi
-eq equals
-ne not equals
-gt greater than大于
本文作者:墨洺的文档
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!