error validating settings: query ‘[39 46 47 100 97 116 101 113 117 101 114 121 46 115 104 39]’ is not valid JSON: json: cannot unmarshal string into Go value of type map[string]interface {}
You can use shell command substitution to replace ./datequery.sh with the output of running that command, but the supported syntax is either single backticks (`command`) or $(command).
Currently you have used single quotes ('), which (in a shell context) will preserve the literal value of each character within quotes. The "39 47 … " sequence is ./datequery.sh converted to the decimal value of each character.
Either of these should work assuming ./datequery.sh is executable:
While I ran the above script I am facing this error
2022-01-21T00:00:00.001Z
2022-09-09T07:31:18.924Z
2022-09-09T03:31:19.023-0400 error validating settings: parsing time “$start” as “2006-01-02T15:04:05Z07:00”: cannot parse “$start” as “2006”
2022-09-09T03:31:19.023-0400 try ‘mongoexport --help’ for more information