Closed nhatanh002 closed 2 years ago
This looks great, thank you!
Your bash looks fine to me. I'd only suggest that you move your code to helpers.sh
and only call mode=$(get_next_mode "initial")
and mode=$(get_next_mode "$mode")
from extrakto.sh
.
This looks great, thank you!
Your bash looks fine to me. I'd only suggest that you move your code to
helpers.sh
and only callmode=$(get_next_mode "initial")
andmode=$(get_next_mode "$mode")
fromextrakto.sh
.
Almost forgot to reply, it was late here and I went to sleep right after I pushed the commit, but it's done :))
Thank you, I just tested it and it works very well!
Glad you found it useful!
Feel free to comment on any change needed, I would really appreciate that. I wouldn't call myself a bash expert, most of the time I just use bash as my go-to quick fix duck tape so can't be confident what I wrote doesn't deviate much from best practices (if bash even has those). The readarray builtin for example was something I found convenient here, but it wasn't available until bash 4.0 or so, if backward compatibility with older bash versions was important for this project then I'd change it to good old read instead.