No Job Contol Error [closed]

I am trying to use % host or % dig in script file. To extract source code of a website. For example:

% host askubuntu.com

But I execute file I get this error:

fg: no job control

What should I do?

0

1 Answer

It's hard to be definitive without the context of what you're trying to do, however it is likely that you are copying commands from a book or website that uses % to indicate the shell prompt - it is not part of the command, and you are not meant to type it. The commands should probably just be

host askubuntu.com

or

dig askubuntu.com

You're getting the error because % has a special meaning in the bash shell, where %n used to bring the nth backgrounded process into the foreground. Specifically, you're getting fg: no job control because job control is disabled by default in non-interactive shells.

1

You Might Also Like