Question: 4 Marks Write a bash function to convert a GID to a group name using the Linux group file. Submit both the function definition and

 4 Marks Write a bash function to convert a GID to

4 Marks Write a bash function to convert a GID to a group name using the Linux group file. Submit both the function definition and 5 invocations. Use the following skeleton as a starting point: gidSearch() { ...; } Replace ... with the commands you require to find the group name for the ID. In your commands you can use the $1 token to represent the GID passed to the function as an argument. I.e. a function defined: gidsearch() { echo $1; } when run as gidsearch 100 would output 100 A correct solution will produce output similar to these example invocations: comp4108@node00:$ gidSearch 100 users comp4108@node00:$ gidSearch 45 sasl

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!