Solved

Scripting hidden windows folder$ in OS X

Posted on 2010-11-18
2
474 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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 …
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now