Skip to content

Instantly share code, notes, and snippets.

@chrisdel101
Last active January 14, 2018 02:46
Show Gist options
  • Save chrisdel101/1460ba8323651f41a4d0650129d162a8 to your computer and use it in GitHub Desktop.
Save chrisdel101/1460ba8323651f41a4d0650129d162a8 to your computer and use it in GitHub Desktop.
array-split
#!/usr/bin/env bash
arr="$@"
cool_strong=("${arr[@]:8:11}")
cute=("${arr[@]:20:4}")
all="I am $cool_strong and $cute"
echo $all
./arrays.bash awesome cool strong cute awesome #I am cool strong and cute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment