Solved

Scripting hidden windows folder$ in OS X

Posted on 2010-11-18
2
478 Views
Last Modified: 2012-05-10
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 :-)
0
Comment
Question by:timmy-mac
2 Comments
 
LVL 12

Accepted Solution

by:
nxnw earned 500 total points
ID: 34169063
I know nothing about SMB or the particular command you are using, but have you tried using single quotes? I am completely guessing at the syntax here, and am putting this in here just to illustrate what I mean:

mount_smbfs -N //$'USER@windows-server.test.com/$USER$' ~/WindowsHome
0
 

Author Closing Comment

by:timmy-mac
ID: 34169248
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
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question