Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started