Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sed Error "extra characters at the end of g command"

Tags:

linux

unix

sed

This is my Sed command:

sed -i 's:io.gatling.app.Gatling:io.gatling.app.Gatling -s "redirects.RedirectLoad" -df /opt/gatling/user-files/data:g' gatling.sh

gatling.sh contains the following:

"$JAVA" $DEFAULT_JAVA_OPTS $JAVA_OPTS -cp "$GATLING_CLASSPATH" io.gatling.app.Gatling "$@"

I'm getting a few issues, mostly due to the whitespaces and / characters. I thought I'd fixed it but now i'm getting extra character errors.

like image 223
WillBroadbent Avatar asked Jun 06 '18 08:06

WillBroadbent


1 Answers

Was missing the -e.

This did the job:

sed -i -e 's:io.gatling.app.Gatling:io.gatling.app.Gatling -s "redirects.RedirectLoad" -df /opt/gatling/user-files/data:g' gatling.sh
like image 176
WillBroadbent Avatar answered Sep 28 '22 02:09

WillBroadbent