Write a shell script that prints the maximum value a process ID can be. code example

Example 1: Write a shell script that prints the maximum value a process ID can be.

//to get only parent process
# pstree -p | grep "apache2" | head -1

           |-apache2(3754)-+-apache2(2361)

Example 2: Write a shell script that prints the maximum value a process ID can be.

//list the PID
# pidof apache2

3754 2594 2365 2364 2363 2362 2361

Example 3: Write a shell script that prints the maximum value a process ID can be.

# pstree -p | grep "apache2" | head -1

           |-apache2(3754)-+-apache2(2361)