Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
clean no exists directories
#!/bin/sh
cat ~/.chpwd-recent-dirs \
| sed -e 's/^..\(.*\)./\1/g' \
| while read line
do
if [ -d "$line" ]; then
echo "\$'$line'"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment