bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39999: BSD sed vs Gnu sed


From: W. Lincoln Harvey
Subject: bug#39999: BSD sed vs Gnu sed
Date: Wed, 29 Apr 2020 12:30:22 -0700

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

[Prev in Thread] Current Thread [Next in Thread]