mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2002 (markdown)
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
`cat` is a tool for con"cat"enating files. Reading a single file as input to a program is considered a [Useless Use Of Cat (UUOC)](http://en.wikipedia.org/wiki/Cat_(Unix)#Useless_use_of_cat).
|
`cat` is a tool for con"cat"enating files. Reading a single file as input to a program is considered a [Useless Use Of Cat (UUOC)](http://en.wikipedia.org/wiki/Cat_(Unix)#Useless_use_of_cat).
|
||||||
|
|
||||||
It's more efficient and less roundabout to simply use redirection. This is especially true for programs that can benefit from seekable input, like `tail`.
|
It's more efficient and less roundabout to simply use redirection. This is especially true for programs that can benefit from seekable input, like `tail` or `tar`.
|
||||||
|
|
||||||
Many tools also accept optional filenames, e.g. `grep -q foo file` instead of `cat file | grep -q foo`.
|
Many tools also accept optional filenames, e.g. `grep -q foo file` instead of `cat file | grep -q foo`.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user