The substitution for a cake would be in equal parts. You may want to cut back on fat and replace half with oil and half with applesauce. The moisture of the cake will be equivalent.
There are times when you can't replace shortening/butter in a recipe ---- pie crust.