Inserting From Command Line

I have the following database and measurements I am trying to insert from command line:

Database: polls
Measurement: nodeMemory
Field or tag (only one): NodeID=1
values: (this will be a variable named $nodemem1): 1921024000

I run the following command:

influx -database ‘polls’ -execute ‘insert nodeMemory,NodeID=1, values=1921024000’

I get the following error:
ERR: {“error”:“unable to parse ‘nodeMemory,NodeID=1, values=1921024000’: missing tag key”}

I figured out what I need for the inserts with static values, now I just need to know how to enter a variable in the values:

influx -database ‘polls’ -execute ‘insert nodeMemory,NodeID=1,server=server01 values=“$nodemem1”’

But I get the following error:

ERR: {“error”:“unable to parse ‘nodeMemory,NodeID=1,server=server01 values=$nodemem1’: invalid boolean”}

Hello @skinfrakki,
Thank you for sharing part of your solution. Unfortunately, you can insert a variable with line protocol. It must be the actual value.

The above solution works