Labels

algorithms (22) Design Patterns (20) java (19) linux (14) Snippet (13) service mix (6) soa (4)

Shell Script System info

#!/bin/sh
echo "###############################"
echo "       Hardware Details        "
echo "###############################"

echo "HostName:`uname -n`"
echo "Machine Name:`uname`"
echo "Processor Name:`uname -p`"
echo "##############################"
echo   "     Software details       "
echo "##############################"
echo "Os Name:`uname -o`"
echo "Os Release:`uname -r`"
echo "Od version:`uname -v`"

Shell Script to find out if a rectangle type

 

echo "Enter Angle A:"
read A
echo "Enter Angle B:"
read B
echo "Enter Angle C:"
read C

if [ $A -eq 90 -o $B -eq 90 -o $C -eq 90 ]
then
    echo "This is Right angled Triangle"
elif [ $A -gt 90 -o $B -gt 90 -o $C -gt 90 ]
then
   echo "This is Obtuse angled Triangle"
elif [ $A -lt 90 -a $B -lt 90 -a $C -lt 90 ]
then
echo "This is acute angled Triangle"
fi

1 comment:

Search 24 Bytes