fix: common.sh: usage guide
count Signed-off-by: fukiame <fukiame@proton.me>
This commit is contained in:
parent
43f64f8e34
commit
492fec1724
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
# imported from https://github.com/dylanaraps/pure-bash-bible
|
# imported from https://github.com/dylanaraps/pure-bash-bible
|
||||||
bb_split() {
|
bb_split() {
|
||||||
# Usage: split "string" "delimiter"
|
# Usage: split "string" "delimiter" "count"
|
||||||
IFS=$'\n' read -d "" -ra arr <<< "${1//$2/$'\n'}"
|
IFS=$'\n' read -d "" -ra arr <<< "${1//$2/$'\n'}"
|
||||||
# printf '%s\n' "${arr[@]}"
|
# printf '%s\n' "${arr[@]}"
|
||||||
printf '%s\n' "${arr[$3]}"
|
printf '%s\n' "${arr[$3]}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue