Skip to content

Instantly share code, notes, and snippets.

@elzup
Created January 21, 2020 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elzup/4d36336470d18ae9e6216d5276f19cbd to your computer and use it in GitHub Desktop.
Save elzup/4d36336470d18ae9e6216d5276f19cbd to your computer and use it in GitHub Desktop.
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