Write a function called leftmatch that works similarly to the rightmatch function developed in Exercise 3. Its two arguments should be as follows:
leftmatch pattern value
Here are some example uses:
$ leftmatch /usr/spool/ /usr/spool/uucppublic
uucppublic
$ leftmatch s. s.main.c
main.c
$
# leftmost pattern value
# remove shortest matching pattern from value
# accomplished with ${var#patt}
value=$2
pattern=$1
echo ${value#$pattern}
You might also like to view...
What command below is used to test network connections by sending a request packet to a host?
A. ps B. ifconfig C. ping D. df
When you apply a filter, the Toggle Filter button is NOT active
Indicate whether the statement is true or false
In photographs, ____ is when the pupils of a subject’s eyes appear red.
a. pink eye b. red eye c. red pupils d. none of the above
The netdom command-line tool can be used to create trust relationships
Indicate whether the statement is true or false