How about just making a script file, 'foo.sh' and put in it some function to perform 'echo foo foo', then next line ./foo.sh to rerun the same script. It would run forever, no? Or until break is pressed. Like so:
But, wouldn't that require you to create a script specifically for "foo" (e.g. foo.sh) and then when you have to do "bar" you have to create another script called bar.sh.
Comment
How about just making a script file, 'foo.sh' and put in it some function to perform 'echo foo foo', then next line ./foo.sh to rerun the same script. It would run forever, no? Or until break is pressed.
Like so:
###
echo foo foo
./foo.sh
###
Replies
But, wouldn't that require you to create a script specifically for "foo" (e.g. foo.sh) and then when you have to do "bar" you have to create another script called bar.sh.