Significado de “+” ou “-” em mensagens nohup

2

Quando um comando com nohup é como:

nohup python [program name] > result_logs &

está pronto, algum aviso será exibido como:

[1]  - [process_id] done       nohup [program name] >result_logs

Mas eu não entendo muito bem o significado do sinal '-' aqui, às vezes vem com '+' como:

[1]  + [process_id] done       nohup [program name] >result_logs

Alguém sabe o significado disso?

    
por ZijunLost 17.01.2017 / 14:13

1 resposta

6

- significa trabalho anterior, + significa trabalho atual

De man bash (seção JOB CONTROL ):

There are a number of ways to refer to a job in the shell. The character % introduces a job specification (jobspec). Job number n may be referred to as %n. A job may also be referred to using a prefix of the name used to start it, or using a substring that appears in its command line. For example, %ce refers to a stopped ce job. If a prefix matches more than one job, bash reports an error. Using %?ce, on the other hand, refers to any job containing the string ce in its command line. If the substring matches more than one job, bash reports an error. The symbols %% and %+ refer to the shell's notion of the current job, which is the last job stopped while it was in the foreground or started in the background. The previous job may be referenced using %-. If there is only a single job, %+ and %- can both be used to refer to that job. In output pertaining to jobs (e.g., the output of the jobs command), the current job is always flagged with a +, and the previous job with a -. A single % (with no accompanying job specification) also refers to the current job.

    
por 17.01.2017 / 14:27

Tags