shell - Bash Scripting ^-...------ | wc … -
what line mean?
^-...------ | wc ...
it part of bash script.
try write:
ls -l | grep ^.......... | wc -l
the output of ls -l
piped, , homecoming number of all files, because .
matches character.
in case, wanted count number of files (might) have owner permission, that's why pattern doesn't care first 3 flags.
look illustration @ line:
-rw------- 1 root root 35 jun 15 15:32 .smbpasswd ↑↑↑↑↑↑↑↑↑↑
not line ^-...------ | wc ...
invalid.
(thought after read @gordondavisson comment, thanks)
bash shell word-count
No comments:
Post a Comment