Created
December 10, 2017 08:57
-
-
Save genbtc/f9b31c92aca5b1e7f27cd68d8b892be8 to your computer and use it in GitHub Desktop.
bash script for prefix append
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Would like to have these first two lines come in as args $1 $2 | |
pre=mingw-w64-x86_64 | |
set -- toolchain freeglut freetype libpng libjpeg-turbo | |
for p in "$@"; do | |
a+=("$pre-$p"); | |
done | |
set -- "${a[@]}" | |
echo "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input 1: mingw-w64-x86_64
Input 2: toolchain freeglut freetype libpng libjpeg-turbo
Desired Output: mingw-w64-x86_64-toolchain mingw-w64-x86_64-freeglut mingw-w64-x86_64-freetype mingw-w64-x86_64-libpng mingw-w64-x86_64-libjpeg-turbo