Page 1 of 1

Porteus 5.0 sed

Posted: 25 Aug 2020, 23:22
by Ed_P
sed defaulted to -i in 4.0. In 5.0 it does not so changes to files are not kept. :o

Porteus 5.0 sed

Posted: 26 Aug 2020, 03:24
by ncmprhnsbl
so you're saying that when editing a file -i (--in-place) wasn't needed? don't think that's anything we've done... can't see how an alias would work..
can only think that it's a change in behaviour for sed itself..
ie. not our bug, more likely an upstream feature/change..

Porteus 5.0 sed

Posted: 26 Aug 2020, 04:08
by Ed_P
When editing via sed a desktop file in 4.0 I did not use the -i option and the file was updated. In 5.0rc2 the same script wasn't changing the file and I couldn't figure out what the problem was. It took me awhile to try the -i option but it solved the problem.
ncmprhnsbl wrote:
26 Aug 2020, 03:24
can only think that it's a change in behaviour for sed itself..
ie. not our bug, more likely an upstream feature/change..
Quite possible, and why I didn't post this in the bug thread, but it's something 5.0 users should be made aware of. imo

Porteus 5.0 sed

Posted: 16 Dec 2020, 01:21
by Rava
Ed_P wrote:
26 Aug 2020, 04:08
Quite possible, and why I didn't post this in the bug thread, but it's something 5.0 users should be made aware of. imo
Is that behaviour true for the sed as used in 5.0rc1 or only for the 5.0rc2 version?

I would have to look up my scripts that use sed for changing files, since I do not recall what syntax each and every one exactly used.

I presume using "-i" would still work okay when the script is run by Porteus 4.0 sed, and it should also work (and according to you: be needed) for 5.0 sed.

Porteus 5.0 sed

Posted: 16 Dec 2020, 02:59
by Ed_P
Rava wrote:
16 Dec 2020, 01:21
I presume using "-i" would still work okay when the script is run by Porteus 4.0 sed, and it should also work (and according to you: be needed) for 5.0 sed.
That's my presumption also.

Porteus 5.0 sed

Posted: 16 Dec 2020, 08:01
by Rava
^
I just wonder, did sed call -i optional but recommended in older versions, or did they switch from optional to mandatory without prior warning?