Comment

Comment by pwd_mkdb

solution without using sed, grep and eval (yikes!); does this suffice? i probably missed something obvious; run with ./

   case ${1-start} in
   start)
     # your script goes here...
     x=100 $0 foo 
    ;; 
   mid)
     echo "This is not printed!"
     x=101 $0 foo
    ;;
   foo)
     x=${x:-10}
     echo x is $x
   esac
parent pwd_mkdb 10 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton