Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As for path duplication, I personally have

    printf '%s\n' "$PATH" | grep --color=auto -E -e '(^|:)'"$( printf '%s\n' "$1" | sed 's/[][\.|$(){}?+*^]/\\&/g' )"'($|:)' > /dev/null 2>&1
    if [ "$?" = 1 ]; then PATH="$1:$PATH" ; export PATH ; fi
in my version of pathadd().


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: