Quotes supported by bash:
"" Double quotation mark: Weak reference, you can implement variable substitution (the variable will be replaced with a value)
SSH Echo " Directory is $ ((pwd)) " 0
' Single quote: Strong reference, do not complete variable substitution (what you input will output)
SSH Echo ' Directory is $ ((pwd)) ' Directory is $ ((pwd))
File name wildcard:
* Any length matching
? Match only one character
[] matches any single character within the specified range
[^] Take the inverse match ls [^0-9]
i/p Redirect:
> Overwrite Output
ls /tmp/>/tmp/cat /tmp/ssh-6xolw4llamwesystemd-private- 30HjJisystemd-private-ch9s6xsystemd-private-mnh52bvarrryum_save_tx. -16.09-Geneva. K8wko4.yumtx
>> Append Output
[Email protected] ~]# ll/tmp/>>/tmp/Chen[[email protected]~]#Cat/tmp/Chen Total dosage --rw-r--r--.1Root root0August - -: Onechendrwx------.2Chen Chen atAugust - the:xx SSH-6xolw4llamwedrwx------.3Root root -August - the:xxsystemd-private-30HjJidrwx------.3Root root -August - the:xxsystemd-private-ch9s6xdrwx------.3Root root -August - the:xxsystemd-private-mnh52b-rw-r--r--.1Root root139August - -:TenVara-rw-r--r--.1Root root134August - -: thevarrr-RW-------.1Root root602344August - the: GenevaYum_save_tx. .- ,-16.09- Geneva. K8wko4.yumtx
(2> overwrite error output 2>> append error Output)
&> redirect standard output or error output to the same file, whether executed correctly or not
[Email protected] tmp]#ls/tmp/&>/tmp/Ccc1[[email protected] tmp]#Cat/tmp/ccc1 ccc1SSH-6xolw4llamwesystemd-private-30HjJisystemd-private-ch9s6xsystemd-private-Mnh52byum_save_tx. .- ,-16.09- Geneva. K8wko4.yumtx[[email protected] tmp]#ls/TMPPPP &>/tmp/Ccc2[[email protected] tmp]#Cat/tmp/CCC2ls: Unable to access/TMPPPP: No file or directory
< input redirection
<< Create a document here
Cat << END
Cat << EOF
Pipeline: |
Linux Bash re-picked 2016-8-16