# Exe 4.1: unary operator expected error

**URL:** <https://get-help.theconstruct.ai/t/exe-4-1-unary-operator-expected-error/5162>\
**Category:** Linux Basics For Robotics\
**Created:** [September 8, 2020, 8:22am UTC](https://get-help.theconstruct.ai/t/exe-4-1-unary-operator-expected-error/5162 "2020-09-08T08:22:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdulbasitisdost](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/abdulbasitisdost/32/9348_2.png) [@abdulbasitisdost](https://get-help.theconstruct.ai/u/abdulbasitisdost)\
**Post date:** [September 8, 2020, 8:22am UTC](https://get-help.theconstruct.ai/t/exe-4-1-unary-operator-expected-error/5162/1 "2020-09-08T08:22:42Z")

</div>

I’m getting an error in exe 4.1 of **linux for robotics** course. I went through articles here but didn’t find any understandable solution. I tried **[[]]** which I searched from **stackoverflow**. It solved the error issue but then there was no output. My queries are:

1. Why is it giving this error?
2. How to get the output simulation?

Thank you  
Abdul Basit

---

<div class="post-metadata">

**Author:** ![ralves](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/ralves/32/7039_2.png) [@ralves](https://get-help.theconstruct.ai/u/ralves)\
**Post date:** [September 8, 2020, 12:42pm UTC](https://get-help.theconstruct.ai/t/exe-4-1-unary-operator-expected-error/5162/2 "2020-09-08T12:42:33Z")

</div>

Hi @abdulbasitisdost,

the error happens normally when you are checking an empty variable.

Instead of using `if [[$VAR_NAME = "SOME_VALUE"]];` try putting `$VAR_NAME` inside double quotes. Example:

```
if [["$VAR_NAME" = "SOME_VALUE"]]; then
   echo YES; 
else
   echo NO; 
fi
```

---

<div class="post-metadata">

**Author:** ![abdulbasitisdost](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/abdulbasitisdost/32/9348_2.png) [@abdulbasitisdost](https://get-help.theconstruct.ai/u/abdulbasitisdost)\
**Post date:** [September 8, 2020, 6:26pm UTC](https://get-help.theconstruct.ai/t/exe-4-1-unary-operator-expected-error/5162/3 "2020-09-08T18:26:47Z")

</div>

Oo. Okay thank you for sharing that sir
