Hour 18

1: You are about to run a custom command called process2, but you would first like to determine where that command resides. Give a UNIX command to do this.
A1: The following command will accomplish this task:
$ type process2
2: How can you determine all directories under /data that contain a file called process2, allowing any possible prefix or suffix to also be displayed (for example, you want to find names such as process2-doc)?
A2: The following command will accomplish this task:
$ find /data -name '*process2*' -print
3: How can you increase the numeric value in variable PRICE to be 3.5 times its current amount? Allow two digits to the right of the decimal point.
A3: The following command will accomplish this task:
 PRICE=`echo "scale=2; ...

Get Sams Teach Yourself Shell Programming in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.