Write a shell script that displays the names of all directory files, but no other types of files, in the working directory.

What will be an ideal response?


There are many ways to solve this problem. The listdirs script uses file to
identify directory files and grep to pull them out of the list. Then sed
removes everything from file’s output, starting with the colon.

$ cat listdirs
file "$@" |
grep directory |
sed 's/:.*//'

Computer Science & Information Technology

You might also like to view...

Explain in words what the following

``` XSL template accomplishes

```

Computer Science & Information Technology

What are VMM agents and what are their purpose?

What will be an ideal response?

Computer Science & Information Technology

With most computers, the operating system is sold separately.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The type of a LinkedList’s items must be a primitive type.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology