I'm making a script that eventually starts over by executing itself again using
exec. The problem is the first few lines are only supposed to be run everytime you launch the script yourself, so I'm wondering if there's any thing I can do to fix this. Here's an example:
echo "welcome" read yesno if [[ $something = etc.. ]]; then whatever fi exec ~/bin/script
This is simplified but it this were my script I would want to ignore the first line, (
echo). Is there some option to
exec I can add? I mean I could make a copy of the script and just omit the first line(s), but it feels like a bad solution.