awk5.awk contains the following script:
BEGIN {
printf "The following are directory files:"
"ls -l | grep '^d' | {print $0}"
printf "There were "NR" directories in this list."
}
When I run the script, Here is what I get:
clyde% awk -f awk5.awk
The following are directory files:There were 0 directories in this list.clyde%
When I run "ls -l | grep '^d'" by itself, I get 20 directories. How can I correct the script.
Thanks in advance...

Help












