0

How to display the list of groups for which login, contained in the environment variable FT_USER, is a member (separated by commas without spaces) using Unix command line in iMac.

Example:

forFT_USER=nours,the result is"god,root,admin,master,nours,bocal"(with-
out quotation marks)

This is how it should be like

 $>./print_groups.sh 
 god,root,admin,master,nours,bocal$>
0
groups $FT_USER | tr ' ' ','

Both groups and tr are common unix utils.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.