3 ms·
The use of grep the author proposes will have each line of output prefixed with the name of the file it came from followed by a colon. That is if the glob expan
by gbrown_ 5y ago
The use of grep the author proposes will have each line of output prefixed with the name of the file it came from followed by a colon. That is if the glob expands to more than one file though, if it only expands to a single file then it is equivalent to cat. Use of the -h option should be passed to grep if the difference in format is something the author wishes to guarantee.
- naniwaduni 5y agoEven when it expands to a single file, it has different output when the file contains empty lines.
- justin_oaks 5y agoI think grep ^ * would fix that and is just as short.