Re: Simple apple script - Beginner Problem
Re: Simple apple script - Beginner Problem
- Subject: Re: Simple apple script - Beginner Problem
- From: James Bensley <email@hidden>
- Date: Tue, 14 Jul 2009 14:56:33 +0100
Hey All,
Thanks for all the replies, most said the same thing which was to use
"quoted form of" or rearrange the "do shell script" command so I have
the following code:
set UNC to (do shell script "/usr/bin/dscl localhost read /Active\\
Directory/All\\ Domains/Users/" & user_name & " homeDirectory | awk -F
\":\" '{print $3}' | cut -c 4-200")
Which works a treat except for one thing; with the UNC path returned
the slashes are the wrong way around, i.e the UNC path returned
contains back slashes but it needs to be forward slashes for the mount
command to correctly interpret the input;
The command returns:
server\share\sub-share\folder
but it needs to be:
server/share/sub-share/folder
Can I do "find & replace" on the return string or some other string
operation to correct this?
James ;)
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GIT/MU/U dpu s: a--> C++>$ U+> L++> B-> P+> E?> W+++>$ N K W++ O M++>$ V-
PS+++ PE++ Y+ PGP t 5 X+ R- tv+ b+> DI D+++ G+ e(+++++) h--(++) r++ z++
------END GEEK CODE BLOCK------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden