Skip to content

Instantly share code, notes, and snippets.

@n1mh
Created May 4, 2017 08:32
Show Gist options
  • Save n1mh/32e1e946825ba7ce6e32d0d453570730 to your computer and use it in GitHub Desktop.
Save n1mh/32e1e946825ba7ce6e32d0d453570730 to your computer and use it in GitHub Desktop.
sed doble substitution
#!/bin/bash
GCC_INSTLLR="https://raw.githubusercontent.com/gecos-team/gecoscc-installer/development/gecoscc-installer.sh"
GCC_VERSION=`curl -s "$GCC_INSTLLR" | grep 'export GECOSCC_VERSION' | cut -d"'" -f2`
GCC_TMPLATE=`curl -s "$GCC_INSTLLR" | grep 'export TEMPLATES_URL' | cut -d'"' -f2 | sed -e 's/$GECOSCC_VERSION/'"$GCC_VERSION"'/'`
# sed 's/xxx/'"$PWD"'/'
echo "Template -> $GCC_TMPLATE"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment