diff --git a/sh/main.sh b/sh/main.sh index 854a787..88e7d00 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -187,22 +187,22 @@ rwx_parse() { local func="${ws}(${ws})${ws}{.*" local id="[_a-zA-Z][_a-z0-9A-Z]*" local line - rwx_ifs_set RWX_CONSTANTS="" - for line in $(echo "${RWX_CODE}" | + printf "%s\n" "${RWX_CODE}" | grep "${start}${constant}${setting}" | - sed "s|${start}\\(${constant}\\)${setting}|\\1|"); do + sed "s|${start}\\(${constant}\\)${setting}|\\1|" | + while IFS= read -r line; do RWX_CONSTANTS="${RWX_CONSTANTS}${line} " done RWX_FUNCTIONS="" - for line in $(echo "${RWX_CODE}" | + printf "%s\n" "${RWX_CODE}" | grep "${start}${id}${func}" | - sed "s|${start}\\(${id}\\)${func}|\\1|"); do + sed "s|${start}\\(${id}\\)${func}|\\1|" | + while IFS= read -r line; do RWX_FUNCTIONS="${RWX_FUNCTIONS}${line} " done - rwx_ifs_unset } # ╭──────┬─────╮