Linux基礎命令:echo的使用
echo指令可以輸出內容到標準輸出,以空白分割字串,並且後面增加換行。此 命令的適用範圍:RedHat、RHEL、Ubuntu、 CentOS、Fedora。 |
語法
echo [-neE] [arg ...]
選項列表
使用示例
使用“\f”換行
[root@localhost ~]# echo -e "hello\fworld" //必須使用-e選項,\f換行之後,游標還在結尾 hello world [root@localhost ~]#
使用“\n”換行
[root@localhost ~]# echo -e "hello\nworld" //必須使用-e選項,\n換行之後,游標在開頭 hello world [root@localhost ~]#
輸出ascii字元
[root@localhost ~]# echo -e "\x31" //十六進位制的31,換算成49,代表的ascii字元就是1 1 [root@localhost ~]#
原文地址: https://www.linuxprobe.com/linux-basic-echo.html
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31559985/viewspace-2672998/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [shell基礎]——echo命令
- 『忘了再學』Shell基礎 — 3、echo命令的介紹與使用
- Linux基礎命令---echo列印內容到標準輸出Linux
- Linux下echo命令的用法Linux
- Linux基礎教程之命令的使用(轉)Linux
- linux基礎命令Linux
- linux 命令 基礎Linux
- Linux的常用基礎命令Linux
- Linux基礎命令---ftpLinuxFTP
- Linux基礎命令---apachectlLinuxApache
- Linux基礎命令---mysqlLinuxMySql
- Linux基礎命令—initLinux
- Linux基礎命令---ifcfgLinux
- Linux基礎命令—pgrepLinux
- Linux基礎命令---pgrepLinux
- Linux基礎命令—nohupLinux
- Linux基礎命令—killallLinux
- Linux基礎命令---suLinux
- Linux基礎命令---chshLinux
- Linux基礎命令---chfnLinux
- Linux基礎命令—splitLinux
- Linux基礎命令---trLinux
- Linux基礎命令---splitLinux
- Linux基礎命令---foldLinux
- Linux基礎命令—catLinux
- Linux基礎命令---catLinux
- Linux基礎命令---cpLinux
- Linux基礎命令---pasteLinuxAST
- Linux基礎命令---whereisLinux
- Linux基礎命令---whichLinux
- Linux基礎命令---sortLinux
- Linux基礎命令—sortLinux
- Linux基礎命令---cmpLinux
- Linux基礎命令---diffstatLinux
- Linux基礎命令—diffstatLinux
- Linux基礎命令---mvLinux
- Linux基礎命令---diffLinux
- Linux基礎命令---lsLinux