diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-03-02 11:33:33 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-03-02 11:33:33 +0000 |
commit | 974685c3e3758295d12bcfb5558389ef60d57ed8 (patch) | |
tree | a1951d648ea8efa76ab630eb6d26d0660f903f03 /subr/rtl_list.subr | |
parent | 6054d40c03c13989692038f9ae860f9a873a19ee (diff) | |
download | midipix_build-974685c3e3758295d12bcfb5558389ef60d57ed8.tar.bz2 midipix_build-974685c3e3758295d12bcfb5558389ef60d57ed8.tar.xz |
subr/build_init.subr:buildp_init_args(): reduce sed(1) usage.
subr/rtl_list.subr:rtl_llift(): added.
Diffstat (limited to 'subr/rtl_list.subr')
-rw-r--r-- | subr/rtl_list.subr | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/subr/rtl_list.subr b/subr/rtl_list.subr index 056d8016..479b0fd4 100644 --- a/subr/rtl_list.subr +++ b/subr/rtl_list.subr @@ -38,6 +38,12 @@ rtl_llength() { echo "${_llength}"; }; +rtl_llift() { + local _list="${1}" _sep="${2}" _sep_new="${3}" IFS; IFS="${_sep}"; + set -- ${_list}; IFS="${_sep_new}"; + echo "${*}"; +}; + rtl_lmatch() { local _list="${1}" _item="${2}" _sep="${3}"; [ -n "$(rtl_lsearch "${_list}" "${_item}" "${_sep}")" ]; |