Found this:
Here's a good macro/script I came across to sell all your grey items at once.......since they are pretty much useless. Came in handy for me! Before using ensure you have a window up at a vendor, or it won't work.
Code:
/script for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("Selling "..name); UseContainerItem(bag,slot) end; end; end