Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a2286662b8341dfc

Jump to content

Talk:Job control (Unix)

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 11 months ago by Stevebroshar in topic Job ID

Job ID

[edit]
"A job ID is a token used to identify jobs to shell builtins. Job IDs begin with the % character; %n identifies job n, while %% identifies the current job."

I'm using bash. When e.g. using the jobs command, I get a list of jobs, but there are no literal percentage characters. Could someone clarify in which situations percentage characters are visible to identify jobs? Thanks, --Abdull (talk) 23:09, 8 March 2010 (UTC)Reply

An example could be shorter then verbal description:
$ sleep 50 &
[1] 71698
$ fg %1
sleep 50    # no shell prompt seen, waiting for sleep to complete 
^Z
[1]+  Stopped                 sleep 50
$ bg %1
[1]+ sleep 50 &
$
141.226.89.53 (talk) 03:10, 16 February 2025 (UTC)Reply
FWIW and not wishing to offend, I find the example neither shorter nor clearer than a verbal description. That said, I think this article would benefit from examples ... similar to this. Stevebroshar (talk) 12:45, 3 August 2025 (UTC)Reply
A job ID is a number. The % prefix is used to reference a job by ID. IDK why the syntax is that way. Seems that the intent of "fg 1" is clear enough. But, for some reason, the job control commands require the % prefix. The "jobs" command shows ID values without the %; although in brackets ... for whatever reason. Stevebroshar (talk) 12:43, 3 August 2025 (UTC)Reply