I&#x27;ve hit a number of small &quot;oh, I could do that if...&quot; use cases over the years; none is really immediately springing to mind.<p>There are things that a shell function can do that a spawned program cannot - mostly to do with affecting shell state.  Updating shell variables and opening file descriptors are obvious examples.