#!/bin/bash # jobs-demo.sh # By: Sharon Tuttle # last modified: 2022-10-04 # # See the difference in this script's output if you # put several jobs into the background, # and then run it "normally" (in its own child shell) # using: # ./jobs-demo.sh # # ...as compared to running it in the current shell by using # the source command: # source jobs-demo.sh # # (and afterwards try to echo $looky) looky="wow" echo "\$looky: $looky" echo "before jobs command:" jobs echo "after jobs command"