You are not logged in.
So, i'm using sed in a bash/zsh script, to remove the default, and paste the following line in /etc/makepkg.conf :
[Line 41]
CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \I remove the default line:
$ sudo sed -i '41d' /etc/makepkg.confbut when i try to set my edited line:
$ sudo sed -i '40 a CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \' /etc/makepkg.confi always end up with:
CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions(without the last symbol)
\Any ideas?
Excuse my ignorance, my profession has nothing to do with computers..
Thank you in advance.
Last edited by Dante777 (2021-08-28 19:57:47)
Offline
sed -i '40 a CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \\' /etc/makepkg.confBut you probably shouldn't be using line numbers for this - and you definitely don't need to call sed twice:
sed -i 's/^CFLAGS.*/CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \\/' /etc/makepkg.confAnd in fact, if all you are changing is -march and -mtune, just do that:
sed -i 's/-march=[^ ]* -mtune=[^ ]*/-march=native/' /etc/makepkg.confLast edited by Trilby (2021-08-28 19:31:47)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
sed -i '40 a CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \\' /etc/makepkg.confBut you probably shouldn't be using line numbers for this - and you definitely don't need to call sed twice:
sed -i 's/^CFLAGS.*/CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \\/' /etc/makepkg.confAnd in fact, if all you are changing is -march and -mtune, just do that:
sed -i 's/-march=[^ ]* -mtune=[^ ]*/-march=native/' /etc/makepkg.conf
Thank you so much !
I'll try it right away.
Edit: works like a charm! Again, Thank You !
Last edited by Dante777 (2021-08-28 19:57:07)
Offline