Skip to content

Instantly share code, notes, and snippets.

@Osse
Last active January 3, 2016 14:19
Show Gist options
  • Save Osse/8475246 to your computer and use it in GitHub Desktop.
Save Osse/8475246 to your computer and use it in GitHub Desktop.
partial='confirm/sample_request_'
# Put all matches into array
files=("$partial"*.json)
# Strip the leading stuff
tmp=("${files[@]#$partial}")
# Strip the trailing stuff
keys=("${tmp[@]%.json}")
for key in "${keys[@]}"
do
vim -O "$partial$key".json "$partial$key".html
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment