Created
July 29, 2016 07:40
-
-
Save jokla/9a717be0d5090a41905fb2890b3a14c1 to your computer and use it in GitHub Desktop.
Check hostname pc in bash
This file contains 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
if [ "$(hostname)" == 'Dell-PC' ]; then | |
echo "This pc is Dell-PC" | |
pc_dell_pc=true | |
fi | |
if [ "$pc_dell_pc" = true ] ; then | |
echo 'Dell pc check' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment