Bob, Thanks for the quick reply! A local unix guru also told me the same thing.
So, just to make sure I really understand this, here is how I understand ssh worked: even thought I gave the command bash -c 'ulimit -a' as 3 separate strings, ssh (either the client or the server) actually concatenate them into one, and sshd forks a shell to parse the concatenated command string, in this case "bash -c ulimit -a". Correct me if I am wrong. Glad I learned something new. Bob Proulx wrote: > > peter360 wrote: >> Can someone explain this to me? Why am I not seeing correct results from >> ulimit after ssh into localhost? Thanks! >> >> $ ssh localhost bash -c 'ulimit -a' >> unlimited > > You have insufficiently quoted your argument to ssh. This is causing > bash not to get "ulimit -a" but to get "ulimit" "-a" instead. You are > seeing the output of "ulimit". > > Try this: > > ssh localhost "bash -c 'ulimit -a'" > > And this: > > echo ulimit -a | ssh localhost bash > > Bob > > > > -- View this message in context: http://www.nabble.com/ulimit-and-ssh--tp25262471p25263766.html Sent from the Gnu - Bash mailing list archive at Nabble.com.