Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Snippets


Code Block
languagebash
themeRDark
titleVersion Bump
collapsetrue
find . -type f -exec sed -i 's/1\.0\.2/1\.0\.3/g' {} \;


Code Block
languagebash
themeRDark
titleVariable Substring Substitution
collapsetrue
CARLA_TARBALL=/mnt/mervin/workspaces/devel/carla/carla_tri_tools/../carla/Dist/CARLA_0.9.9.4.tar.gz
# Extract the version using sed
CARLA_VERSION=`echo ${CARLA_TARBALL} | sed 's/.tar.gz//' | sed 's/.*CARLA_//'`
# Alternatively, using bash parameter substitution
CARLA_VERSION=${CARLA_TARBALL/.tar.gz/}
CARLA_VERSION=${CARLA_VERSION/*CARLA_/}