Sorry; my explanation above is not correct.  
What I meant to say is that to edit a file in place WITHOUT CREATING a backup 
file, BSD sed’s -i option requires a zero-length string as a mandatory 
argument, while Gnu sed’s -i option does not take any argument.  If a backup 
file is wanted, then their option -i syntax is identical.

The INSTANTIATE macro as written is not including any argument to sed’s -i 
option, meaning that no backup file is wanted.  

Therefore, a very simply solution to this problem is to make a backup file, 
then delete it.  Both sed versions would work correctly.
A more complicated solution is to determine which version of sed is being used, 
and change the INSTANTIATE macro to use the correct syntax.

Gnu sed has a version option (—version), but BSD sed does not (it throws an 
error when either -v or —version are used).

wlh


Reply via email to