1

I wrote the following scripts(the two scripts are at the same directory),

script A,

#!/bin/bash

. B.sh

script B,

#!/bin/bash

echo "script B..."
read -rsp $'Press enter to continue...\n'

After executing script A, I found when 'Press enter to continue...' message displays on the screen, but I still can't see script B is been opening using lsof.

lsof +D "/PATH/"
Matt Elson
  • 4,177
  • 8
  • 31
  • 46
  • Script *A* doesn't seem to be necessary, *B.sh* run direct from the command line also doesn't show up in `lsof`. – agc Apr 17 '17 at 15:43
  • 1
    Do an strace on the invocation of a.sh. You'll see it opens B.sh, reads it completely, closes it, and then invokes the commands. – William Pursell Apr 17 '17 at 20:47

0 Answers0