Hi,

I'm trying to do a bulk add to a workstation group via zman wga in a bash script. I took a list from an inventory report and put it into a text file along with the location, sample below.

Code:
"/devices/workstations/Windows 7 Housekeeping Folder/ASQS/62803-asqs"
"/devices/workstations/Windows 7 Housekeeping Folder/ASQS/62804-asqs"
"/devices/workstations/Windows 7 Housekeeping Folder/ASQS/62669-asqs"
"/devices/workstations/Windows 7 Housekeeping Folder/ASQS/61496-asqs"
"/devices/workstations/Windows 7 Housekeeping Folder/ASQS/59390-asqs-lap"
I then created the following bash script to pass the file and execute the command one line at a time

Code:
#!/bin/bash
command=/Devices/Workstations/Sophos/Phase1
while read line; do
        echo zman wga $command $fileline
        zman wga $command $fileline
done < group.txt
When echoed, the combination of the initial command plus the 2 variables gives me the correct output, eg:

Code:
zman wga /Devices/Workstations/Sophos/Phase1 "/devices/workstations/Windows 7 Housekeeping Folder/ASQS/61496-asqs"
But when the script actually executes the zman command, it returns the following:

Code:
Error:Could not find the object "/Devices/Workstations/"/devices/workstations/Windows".
Error:Could not find the object "/Devices/Workstations/7".
Error:Could not find the object "/Devices/Workstations/Housekeeping".
Error:Could not find the object "/Devices/Workstations/Folder/ASQS/61496-asqs"".


ERROR: 22
Am I wasting my time in thinking that zman wga will accept variables from a bash script?

I was thinking it might be because of the spaces but we added \ 's to them to escape char the space and it made no difference.

Anyone got any thoughts?

Neil.