I'm trying to pull the asset tag info from the JSS API and apply that to the Computer Info Field 1 on the device. I'm still learning scripting, and need help with my syntax. This is what I have so far...
#!/bin/bash
#Pull Asset Tag from the device
asset_Tag=$ /usr/bin/awk -F'<asset_tag>|</asset_tag>' '{print $2}';
#Name the ARD field 1 with the asset tag pulled from JSS
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -computerinfo -set1 -1 "$asset_Tag"