REDO-WHICHDO(1) General Commands Manual REDO-WHICHDO(1)

redo-whichdowrite the .do file search path

redo-whichdo target

The redo-whichdo utility writes the path searched for the target ‘.do’ file, printing one occurence per-line, and stopping at the first existent occurence.

The ‘.do’ file is searched in the target directory. If the target directory does not contain the desired ‘.do’ file, it will move to its parent directory and try again, until it reaches the main directory (where redo(1) was executed or, if it was not executed, the current directory) or the root directory.

The ‘.do’ file is searched in the following form “target.do”. If the target ‘.do’ file does not exist, it will use the form “default.extension.do”, where extension is the target name extension (e.g file), if the file still does not exist, one extension will be left trimmed (e.g “default.c.o.do” becomes “default.o.do”), and this pattern repeats until it reaches the form “default.do”.

The redo-whichdo utility exits 0 on success, and >0 if an error occurs.

$ pwd
/tmp/program
$ redo-whichdo a/b/c.x.y.o
/tmp/program/a/b/c.x.y.o.do
/tmp/program/a/b/default.x.y.o.do
/tmp/program/a/b/default.y.o.do
/tmp/program/a/b/default.o.do
/tmp/program/a/b/default.do
/tmp/program/a/default.x.y.o.do
/tmp/program/a/default.y.o.do
/tmp/program/a/default.o.do
/tmp/program/a/default.do
/tmp/program/default.x.y.o.do
/tmp/program/default.y.o.do
/tmp/program/default.o.do
/tmp/program/default.do

redo(1), redo-ifchange(1)

June 4, 2022 EltaninOS