Question: Write a Perl script to take an input of the command, ps aux | grep pts which should print a table of the pts entry

Write a Perl script to take an input of the command, "ps aux | grep pts" which should print a table of the pts entry followed by the command and sorted by pts entry and then the command.

Ex: of script execution running on debian

# ==========================================

# TERMINAL

# ==========================================

ps aux | grep pts | ./script.pl # command for script execution

# expected output below

pts/0 bash

pts/0 tmux

pts/1 -bash

pts/1 /usr/bin/perl ./script_solution.pl

pts/1 grep pts

pts/1 ps aux

# Done with script execution and output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!