Entering a shell command while using ed

To temporarily switch out of the ed program and run a shell command, enter:
!command name