If I understand correctly, you want to achieve something like the following ...
Assuming I'm root, and I would like to know the soft limit information configured for the fred user, the following approach:
su - fred -c "ulimit -Sa"
will return the desired values.
Alternatively, if, according to your question, you are not a root user, then you can use sudo and optionally enter the required password at runtime, as shown here.
echo "freds password" | sudo -Siu fred ulimit \-Sa
source share