Created
April 29, 2016 14:41
-
-
Save umi-uyura/4b215ab821186419b6c5543406993755 to your computer and use it in GitHub Desktop.
To display the computer name of the Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
computer_name=$(scutil --get ComputerName) | |
local_host_name=$(scutil --get LocalHostName) | |
host_name=$(scutil --get HostName) | |
echo "Computer Name : $computer_name" | |
echo "Local Host Name : $local_host_name" | |
echo "Host Name : $host_name" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment