you are viewing a single comment's thread
view the rest of the comments
[–] 5 points 1 year ago

@tetris11 @Aedis More like:

isEven() {    case "$1" in        *[02468]) return 0;;        *) return 1;;    esac;}

(If all the line breaks are gone from this code snippet, blame Lemmy. It looks fine here.)

  • source
  • parent