I have written a shell script that gets me a list of all attributes on an NSS volume using the command attrib.

Unfortunately, I cannot seem to get scripting and attrib to work well together.

If my script is in /root/bin and it does the following:

filepath="/media/nss/DATA/This\ Is\ My\ Test.txt"
attrib $filepath

It results in an error stating it cannot get attributes on the following file:
/root/bin/media/nss/DATA/This\ Is\ My\ Test.txt

Attrib keeps putting my PWD in front, and I cannot seem to pipe the path to the attrib command either!

Please help