Here is how to look at the PATH under #Linux, #macOS, #FreeBSD or #Unix. Say find if JAVA_HOME or "games" dir in the path (bash/sh/ksh syntax):
tr ":" "\n"<<<"$PATH" | grep games
## OR ##
grep -o games <<<"$PATH"
@nixCraft rather than complicated triple redirect why not
echo $PATH | tr ... | grep ...
Much more read an
CleverLibre Social is an inclusive social instance for open discussion, learning, and community. All cultures welcome. Hate speech and harassment strictly forbidden.