You should be able to add -f (follow all forks) on strace and it will
follow everything.   But without the script tracing POC mentions you
aren't really going to know what line gets the error.

It is likely the bug is in one of the commands you are using, and it
may depend on the data you are getting and processing.

On Sun, May 21, 2023 at 4:39 PM Patrick O'Callaghan
<pocallag...@gmail.com> wrote:
>
> On Mon, 2023-05-22 at 07:09 +1000, Michael D. Setzer II via users
> wrote:
> > Located the earlier script. It still gave the error so tried
> > strace and got
> > strace ./mktext2x.sh
> > execve("./mktext2x.sh", ["./mktext2x.sh"],
> > 0x7ffc37e55570 /* 35 vars */) = -1 ENOEXEC (Exec
> > format error)
> > strace: exec: Exec format error
> > +++ exited with 1 +++
> > But running the corrected one ran fine as is and with
> > strace.
> >
> > But then tried to run it again, and mktext2x.sh runs
> > without error?
> >
> > Running the one with bash line, strace works fine.
> > strace ./mktext2.sh
> > execve("./mktext2.sh", ["./mktext2.sh"], 0x7ffc9afbcb80
> > /* 63 vars */) = 0
> > brk(NULL)                               = 0x55a016794000
> >
>
> AFAIK what you're tracing here is the Shell itself, not the script
> (except indirectly), which is unlikely to be useful in most cases.
>
> You can do some tracing of Shell scripts. See for example
> https://www.tecmint.com/trace-shell-script-execution-in-linux/
>
> poc
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
> Do not reply to spam, report it: 
> https://pagure.io/fedora-infrastructure/new_issue
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to