Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can execute binary, but not using "source"

Trying to get watch jobs to work. This is tricky because jobs reports jobs owned by the current shell, and watch creates another shell. Therefore I would like to run . watch jobs or source watch jobs, but I get this error:

-bash: source: /usr/bin/watch: cannot execute binary file

Here is the output of file /usr/bin/watch:

/usr/bin/watch: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=0xe207fd209faf781a58f5f30922c99da759bd3953, stripped

How to debug source in this case?

like image 206
djechlin Avatar asked Mar 22 '26 21:03

djechlin


1 Answers

You can only source scripts, not executables. Try:

while true; do clear; jobs; sleep 2; done
like image 136
John Kugelman Avatar answered Mar 25 '26 11:03

John Kugelman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!