: <<! if ! file .; then wc `echo *`; fi ! df | tail wc $(echo *) !If '<<!' doesn't work, you can switch to '<<SOMETHING_UNIQUE'.
Wednesday, September 16, 2009
Multiline comments in shell with here-document
Did you know that you can use multiple lines in shell with the ":" command and a here-document? The following example is inspired by two scripts from SHELLdorado:
Posted by Alexander Nasonov
- ▼ September (5)