I am trying to put together a script to find a requested script or program on the user's search path. Am trying to replace the colons separating the parts of a path with a newline to let xargs pass the directories to a list command, but I haven't gotten that far. This is my progress:
tr ":" "\n" did what I needed. sed didn't do anything with the backslash but ignore it, the letter "n" separated the path directories rather than ":". Thanks for looking at it.
And I have seen several "solutions" like this that were unnecessary.
Usually you set up your PATH first, then simply run the commands, and let the shell find them.