Strace: exec: exec format error strace: exec: exec format error strace -o out.log. /print. The contents of the print.sh file are as follows:

# set e
set -e
echo test trace print commander
Copy the code

Cause: The shell reference is not added when the. Sh file is executed. As a result, strace cannot use the shell to format the printed information. To solve. ‘reference’

Add the following shell references to the a.. sh file. The beginning of the script must be loaded.

#! /bin/bash
# set e
set -e
echo test trace print commander
Copy the code

B. Add the current shell invocation to the command. Strace -o out.log $SHELL./print.sh.