Write a script that accepts a part of a process name

Assignment Help Programming Languages
Reference no: EM13749020

tput setaf color, where color is a number from 0 to 7 (try them out to see what colors they represent).

To return the terminal to its original color, you can use tput sgr0.

Using what we know about shell scripts, write a script that accepts a part of a process name as the first argument (like pgrep), which prints out the PID of all matching processes in blue, which is color code 4. Then print out the number of processes that matched in normal text.

If the user doesn't pass exactly one argument to the script, it should print out the following usage message and exit with a return code of 1:

Usage: scriptname pname
Displays all process IDs with image names matching pname.

Reference no: EM13749020

Questions Cloud

Why is process management necessary for an organization : Why is process management necessary for an organization and Discuss some of the key aspects to developing successful process and systems development projects
Explain trading amongst europe and africa : Explain Trading amongst Europe and Africa. Which had a great impact upon day to day life in Africa in the seventeenth through nineteenth centuries: Christianity, or trade with Europe and its colonies?
Case study on green mountain coffee roasters : Case Study on Green Mountain Coffee Roasters and Keurig Coffee
The long-standing mubarak regime in egypt : It would have been hard to miss the information had you been scanning the newspapers during the tumultuous February of 2011, when the long-standing Mubarak regime in Egypt was swept from power by a popular uprising ultimately aligned with the militar..
Write a script that accepts a part of a process name : Using what we know about shell scripts, write a script that accepts a part of a process name as the first argument (like pgrep), which prints out the PID of all matching processes in blue, which is color code 4. Then print out the number of proces..
Write an essay on the mexican war 1846-1848 : Write an essay on The Mexican War 1846-1848.
What do chinese artifacts reveal about chinas civilization : What do Chinese artifacts reveal about China's early civilization?
Imagine that the chief technology officer : Imagine that the Chief Technology Officer (CTO) of your organization, or of an organization in which you are familiar, has tasked you with researching the potential for using virtualization in the organization. You must write a report that the CTO an..
Write an essay on renaissance or gothic : Write an essay on Renaissance or Gothic. Explain how the works of art fit into the context of the time period. Keep in mind that only art works that fit into the period of Middle Ages-Renaissance will be accepted.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd