Substitution
- Daniel Stonier
Owned by Daniel Stonier
About
Search, find and replace from the command line
Snippets
Version Bump Expand source
find . -type f -exec sed -i 's/1\.0\.2/1\.0\.3/g' {} \;
Variable Substring Substitution Expand source
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_/}