Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Shell script activity (12.7)

Shulou Source: shulou.com Published: 2022-06-01 10:26:15 10月02日 Update

Example 1. Enter two numbers at will and then make a judgment

Vi number.sh

#! / bin/bash

# written by lizheng

Echo "please enter two number"

Read a

Read b

If test $a-eq $b

Then echo "NO.1 = NO.2"

Elif test $a-gt $b

Then echo "NO.1 > NO.2"

Else echo "NO.1 < NO.2"

Fi

Tags: Number input script Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Huawei MySQL vpn Apple