of a path. Here's a command pair that echos each directory from the root down to the "current working directory":
p=$(pwd) until [ $p = $d ]; do p=${p#*/}; d=${... # New filename suffix.
if [ -n "$1" ]
then
directory=$1 # If directory name given as a script argument...
else
directory=$PWD # Otherwise use current working directory.
fi
# Assumes all files in the target directory ar... tring, is a file and is writable.
mbfl_file_is_directorydirectory Function
Returns true if directory is not the