[so] [Tema 1 - SO] Cod de return &

Mihai Maruseac mihai.maruseac at gmail.com
Tue Mar 22 06:51:29 EET 2011


Cel mai simplu e să testezi în Bash :)


mihai at keldon:~$ sleep 100 & slep || echo $?
[1] 8040
No command 'slep' found, did you mean:
 Command 'sleep' from package 'coreutils' (main)
 Command 'step' from package 'step' (main)
slep: command not found
127
mihai at keldon:~$ sleep 1 & slep || echo $?
[2] 8043
No command 'slep' found, did you mean:
 Command 'sleep' from package 'coreutils' (main)
 Command 'step' from package 'step' (main)
slep: command not found
127
mihai at keldon:~$ (sleep 1 & slep) || echo $?
No command 'slep' found, did you mean:
 Command 'sleep' from package 'coreutils' (main)
 Command 'step' from package 'step' (main)
slep: command not found
[2]+  Done                    sleep 1
127
mihai at keldon:~$ (sleep 1 & sleep 2) || echo $?
mihai at keldon:~$

-- 
MM


More information about the so mailing list