Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to get name of pc bash script

computer_name=$(whoami)

if [ $computer_name == "NAME" ]
then
    echo "a is equal to b in NAME pc"
    echo $computer_name
else
    echo "a is not equal to b another pc"
    echo $computer_name
fi
 
PREVIOUS NEXT
Tagged: #pc #bash #script
ADD COMMENT
Topic
Name
4+4 =