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$>

1 Answer 1

0
groups $FT_USER | tr ' ' ','

Both groups and tr are common unix utils.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .