login shell or not?

2007-02-12 Thread peter360
In an interative shell, what is the easiest way to tell whether it is a login shell or not? Thanks. -- View this message in context: http://www.nabble.com/login-shell-or-not--tf3211932.html#a8919535 Sent from the Gnu - Bash mailing list archive at Nabble.com.

wrong lineno inside trap?

2009-01-09 Thread peter360
I wrote a test program test.sh: trap ' echo this is line 3, but LINENO=$LINENO ' 0 echo this is line 7, and LINENO=$LINENO --- when I ran it I got $ sh /tmp/test.sh this is line 7, and LINENO=7 this is line 3, but

Re: wrong lineno inside trap?

2009-01-14 Thread peter360
Chet Ramey wrote: Bash-4.0 should behave better in this area, but quoted strings will always cause unpredictable values for $LINENO. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ramey, ITS, CWRUc...@case.edu http://cnswww.cns.cwru.edu/~chet/

ulimit and ssh?

2009-09-02 Thread peter360
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 but $ bash -c 'ulimit -a' core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority

Re: ulimit and ssh?

2009-09-02 Thread peter360
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

Re: ulimit and ssh?

2009-09-08 Thread peter360
this... Bob Proulx wrote: peter360 wrote: 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, Yes. ssh (either the client or the server) actually concatenate them into one

Re: ulimit and ssh?

2009-09-20 Thread peter360
That makes sense. So the feature is to split all parameters on space even if they are quoted? I would vote to remove this feature in ssh. Thanks for the explanation. Greg Wooledge wrote: On Tue, Sep 08, 2009 at 11:39:02AM -0700, peter360 wrote: Thanks for the explanation. So my

Re: ulimit and ssh?

2009-09-20 Thread peter360
In my case, I just got $ ssh localhost bash -x -c 'ulimit -a' unlimited + ulimit Not very informative. Marc Herbert-6 wrote: peter360 a écrit : Thanks for the explanation. So my understanding of the way ssh works is still incorrect. I am confused about at which point the two

Re: ulimit and ssh?

2010-01-08 Thread peter360
Proulx wrote: peter360 wrote: Thanks Adreas. That was what I suspected in my reply to Bob. But Bob disagreed. Looks like there were some confusion about this feature even among experts. Seems another reason to deprecate the feature. I don't think anything I said disagreed with what