How use breakpath command in shell file?
From somewhere I have available in the macOS 10.15.1 Terminal window the command "breakpath", which gives as output the entries in $PATH, one per line. And I can redirect its output, e.g.:
breakpath > ~/myPATH.txt
If I use it in a bash shell file "~/printpath.sh" such as
#! /bin/bash
breakpath > ~/myPATH.txt
however, I get an empty file written and, in Terminal, the error message:
./printpath.sh: line 2: breakpath: command not found
What's wrong?
Unfortunately, as I said, I don't know the source of "breakpath". I tried "man breakpath" but get "No manual entry for breakpath". And when I search my Mac for a file named "breakpath", I find nothing.
iMac 27", macOS 10.15