Porteus 5.0 sed

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 5.0 sed

Post#1 by Ed_P » 25 Aug 2020, 23:22

sed defaulted to -i in 4.0. In 5.0 it does not so changes to files are not kept. :o
Ed

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Porteus 5.0 sed

Post#2 by ncmprhnsbl » 26 Aug 2020, 03:24

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..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 5.0 sed

Post#3 by Ed_P » 26 Aug 2020, 04:08

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
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus 5.0 sed

Post#4 by Rava » 16 Dec 2020, 01:21

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.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 5.0 sed

Post#5 by Ed_P » 16 Dec 2020, 02:59

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.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus 5.0 sed

Post#6 by Rava » 16 Dec 2020, 08:01

^
I just wonder, did sed call -i optional but recommended in older versions, or did they switch from optional to mandatory without prior warning?
Cheers!
Yours Rava

Post Reply