There are several do nothing solutions in a shell. Most notably
:, a POSIX required null utility.
But you also require that it is an external file.
So: the POSIX standard specified dummy executable files that do nothing could be:
- Utilities that output nothing and their exit status is success (0) (except were noted) (in order of relevance (IMO):
printf '' # requires a format. The format may be empty.
test 1 # requires a non-empty string (or number).
[ 1 ] # equivalent to test.
true # requires no argument.
false # requires no argument (exit code IS 1 ).
rm -f '' # DO NOT USE. requires a file name and will remove it.
sh -c '' # may load init files into memory, not a clean solution.
# but it is almost unheard of that `sh` is missing.
# sh -c '' /path/to/file will not damage the file.
- Utilities that also end on an exit code of
0 but have some output:
There may be others ?. search yourself list of executables
But your query also specify (If I understand you correctly) that the called executable is compatible with:
> the actual invocation done by the build system is $EDITOR /path/to/file
That seem to imply that the executable should not use any argument, or, accept one argument and do nothing to it.
I do not know the exact details of your build system, but probably a:
EDITOR is set to
test should work perfectly fine (or true, or false).
If some output is not a problem (the build system discard the output of the
printf may be suitable also.