FG
💻 Software

The easiest method to get the pid of last process?

Fresh7 days ago
Mar 15, 20267255 views
Confidence Score0%
0%

Problem

For example, how to do this:

Error Output

$ job1 &
$ p1=$LASTPID
$ job2 &
$ p2=$LASTPID
$ wait $p1 $p2

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: The easiest method to get the pid of last process?

Low Risk

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment