Bash file - if then-
        Posted  
        
            by 
                user2949827
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user2949827
        
        
        
        Published on 2013-11-03T15:29:26Z
        Indexed on 
            2013/11/03
            15:53 UTC
        
        
        Read the original article
        Hit count: 277
        
I want to wright a login script for my organization, The script needs to discover users by Group id's and then define the map drive they need on their computer.
I started writing down the script and it looks like this:
ID
if [gid=10524657]
then
    mkdir /home/likewise-open/Domain/Username/Desktop/Share
    sudo mount.cifs //fs01/salesnew /home/likewise-open/Domain/Username/Desktop/share -o user=X
else [gid=41654564] (etc....)
That is the first time i am writing a script in Ubuntu,
Can you tell me what am i doing wrong ?
Is it possible for Linux to identify the gid from the ID command ? if not what is the alternative option?
Can someone please advise ?
© Stack Overflow or respective owner