• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
truncate the hostname of local computer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

truncate the hostname of local computer


  • Subject: truncate the hostname of local computer
  • From: Steve Ingram <email@hidden>
  • Date: Thu, 9 Dec 2004 16:13:18 -0800


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?

Thanks for any suggestions.

Steve Ingram

_______________________________________________
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


  • Follow-Ups:
    • Re: truncate the hostname of local computer
      • From: Andrew Oliver <email@hidden>
    • Re: truncate the hostname of local computer
      • From: Martin Orpen <email@hidden>
    • Re: truncate the hostname of local computer
      • From: Sander Tekelenburg <email@hidden>
    • Re: truncate the hostname of local computer
      • From: David Andrews <email@hidden>
  • Prev by Date: Re: delete first 3 characters in a file name
  • Next by Date: Re: delete first 3 characters in a file name
  • Previous by thread: Re: set the clipboard not available in some apps (like Word)
  • Next by thread: Re: truncate the hostname of local computer
  • Index(es):
    • Date
    • Thread