Integer expression expected error in shell script

后端 未结 6 1480
自闭症患者
自闭症患者 2020-12-17 08:36

I\'m a newbie to shell scripts so I have a question. What Im doing wrong in this code?

#!/bin/bash
echo \" Write in your age: \"
read age
if [ \"$age\" -le \         


        
6条回答
  •  不思量自难忘°
    2020-12-17 09:11

    Try this:

    If [ $a -lt 4 ] || [ $a -gt 64 ] ; then \n
         Something something \n
    elif [ $a -gt 4 ] || [ $a -lt 64 ] ; then \n
         Something something \n
    else \n
        Yes it works for me :) \n
    

提交回复
热议问题