Get the App
SLTechnology News&Howtos  ›  Servers  › 

What you need to pay attention to when using [] test strings in shell

Shulou Source: shulou.com Published: 2022-06-03 00:09:59 09月22日 Update

[] in shell can be used to do various tests. When comparing tests, such as string comparison, you must put double quotation marks on the string, otherwise it will report an error of [too many arguements].

A few people abc'

If ["$a"]; then

Echo $a

Fi

Tags: Character string test quotation mark error will report place Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker OPPO Reno Redmi Huawei Shulou Tech Info