Skip to content

Instantly share code, notes, and snippets.

@mattorp
Last active November 8, 2021 11:29
Show Gist options
  • Save mattorp/08eec26dbbf285abf3f4895687d6b366 to your computer and use it in GitHub Desktop.
Save mattorp/08eec26dbbf285abf3f4895687d6b366 to your computer and use it in GitHub Desktop.
split by delimeter
delimeter=/
query='f/s'
arr=(${query//$delimeter/ })
first=${arr[0]}
second=${arr[1]}
echo "$first"
echo "$second"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment