Link to home
Start Free TrialLog in
Avatar of timmy-mac
timmy-mac

asked on

Scripting hidden windows folder$ in OS X

HI there,

trying to run this script but it doesn't work and i am thinking it has something to do with the $ at the end of all users home folders. Could someone maybe help me writing this script correctly

#!/bin/bash
mkdir ~/WindowsHome
mount_smbfs -N //$USER@windows-server.test.com/$USER$ ~/WindowsHome

the leading dollar is the script dollar and the trailing dollar is the hidden folder dollar

any help appreciated lots of points up for grabs here :-)
ASKER CERTIFIED SOLUTION
Avatar of nxnw
nxnw
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of timmy-mac
timmy-mac

ASKER

You prompted me to the correct solution, the single quotes didn't cut it but I then realised if I put " around the trailing dollar it would print the second dollar and not think it as a syntax

Thanks for the mind nudge