Re: truncate the hostname of local computer
Re: truncate the hostname of local computer
- Subject: Re: truncate the hostname of local computer
- From: David Andrews <email@hidden>
- Date: Fri, 10 Dec 2004 00:45:50 -0500
This is similar to the "delete first 3 characters in a file name" thread currently under discussion.
A way to delete the ".local" from the file name:
set text item delimiters to "."
set {theName} to text items of "ghs27038.local"
set text item delimiters to {""}
theName --> "ghs27038"
David A
On Dec 9, 2004, at 7:13 PM, Steve Ingram wrote:
Our computers have the computer name set to eight characters - three letters followed by five numbers. Example: ghs27038
In a script we are using to reset the computer name I have the line:
set computerNameNoChange = `/bin/hostname`
This gives me a value of ghs27038.local
This is close to what I want. How do I get computerNameNoChange to equal only the first eight characters of /bin/hostname ?
More precisely, how do I get computerNameNoChange to be the value of the current computer name, without the ".local" added?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden