The Bourne original — a directory check over the arguments
The Bourne original — a directory check over the arguments
Answer
#!/bin/sh for d in "$@" do if [ -d "$d" ]; then echo "$d: directory" fi done
Six lines, three of which are punctuation the shell needs, and every expansion has to be quoted or a filename with a space breaks it. This is the script the next lesson block rewrites.
Python 3 documentation: sys, os.path, os, subprocess (docs.python.org/3)