You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... as it is not portable between GNU sed and BSD sed (as used on e.g. macOS).
Possible alternatives:
avoid it altogether: in the first usecase it is used to remove leading whitespace form a file we just generated. Instead of that, simplify modify the string cont suitably before printing it out (e.g. search for the substrings of the form \n or \n\t or \n\t and replace them by \n: Say via cont := JoinStringsWithSeparator(List(SplitString(cont,"\n"), line -> StripBeginEnd(line, " \t")), "\n"); -- this would also remove trailing whitespace, which I think is desirable here
use perl -pi -e EXPR (but then you need perl, which is a much heavier dependency than sed)
instead of using -i to enable in-place editing, just pipe the output of sed into a separate file
The text was updated successfully, but these errors were encountered:
... as it is not portable between GNU sed and BSD sed (as used on e.g. macOS).
Possible alternatives:
cont
suitably before printing it out (e.g. search for the substrings of the form\n
or\n\t
or\n\t
and replace them by\n
: Say viacont := JoinStringsWithSeparator(List(SplitString(cont,"\n"), line -> StripBeginEnd(line, " \t")), "\n");
-- this would also remove trailing whitespace, which I think is desirable hereperl -pi -e EXPR
(but then you need perl, which is a much heavier dependency than sed)-i
to enable in-place editing, just pipe the output ofsed
into a separate fileThe text was updated successfully, but these errors were encountered: