awk script

Hi,

I am trying to write a awk script. Below is the logic.

I want to get the user input and search the user in the end system using API.

It is always missing some escape character in the end. Can you help me with the right script.

BEGIN {
printf "Enter the name: ";
getline name;
print name;
}
{
command = "curl -v -H \"Authorization: WS 00eWxhTuhoHMBcA\"  -H \"Accept: application/json\"  -H \"Content-Type: application/json\"  -X GET \"https://iam.test.com/api/users?search=profile.user\ eq "\ name ;

not awk solution but simple shell approach

#!/bin/bash
read -p "Enter the name : " name
echo "Hi, $name"
command=`curl -v -H 'Authorization: WS 00eWxhTuhoHMBcA'  -H 'Accept: application/json'  -H 'Content-Type: application/json'  -X GET  https://iam.test.com/api/users?search=profile.user=$name`
echo $command;