Files
secondo/CM-Scripts/removedirs.sh
2026-01-23 17:03:45 +08:00

19 lines
319 B
Bash

#!/bin/sh
#
# August 2006, M. Spiekermann
#
# Reads in the standard input and removes all lines which
# are equal to an existing directory name
while read <&0 line; do
if [ ${#line} -gt 0 ]; then
if [ -d $line ]; then
echo "Removing directory $line" >& 2
else
echo $line
fi
fi
done
exit 0