Re: How to check the number of terminals open from inside a shell script

2010-10-30 Thread Cameron Simpson
On 29Oct2010 09:52, suvayu ali wrote: | On 29 October 2010 06:39, Mark Liggett wrote: | > You could add your script to the .bashrc file – this way the script would | > run once when the user logs on. | | I presume you meant ~/.bash_profile ? ~/.bashrc is sourced every time | a user opens a termi

Re: How to check the number of terminals open from inside a shell script

2010-10-29 Thread suvayu ali
On 29 October 2010 06:39, Mark Liggett wrote: > You could add your script to the .bashrc file – this way the script would > run once when the user logs on. I presume you meant ~/.bash_profile ? ~/.bashrc is sourced every time a user opens a terminal, whereas ~/.bash_profile is sourced every time

Re: How to check the number of terminals open from inside a shell script

2010-10-29 Thread Mark Liggett
Whoops - apologies. Friday afternoon :-) On 29/10/2010 16:26, "Joachim Backess" wrote: > On 10/29/2010 03:39 PM, Mark Liggett wrote: >> Hi Sumatheja, >> >> I¹m guessing you want a script to run only once (did say whether it was >> per user). You could add your script to the .bashrc file ­ t

Re: How to check the number of terminals open from inside a shell script

2010-10-29 Thread Joachim Backess
On 10/29/2010 03:39 PM, Mark Liggett wrote: > Hi Sumatheja, > > I’m guessing you want a script to run only once (did say whether it was > per user). You could add your script to the .bashrc file – this way the > script would run once when the user logs on. Alternatively run the > script and exp

Re: How to check the number of terminals open from inside a shell script

2010-10-29 Thread Mark Liggett
Hi Sumatheja, I'm guessing you want a script to run only once (did say whether it was per user). You could add your script to the .bashrc file - this way the script would run once when the user logs on. Alternatively run the script and export an environment variable - then check it using an i

Re: How to check the number of terminals open from inside a shell script

2010-10-29 Thread JB
JB gmail.com> writes: > ... $ who am i -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Re: How to check the number of terminals open from inside a shell script

2010-10-29 Thread JB
sumatheja gmail.com> writes: > ... $ w $ who JB -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

How to check the number of terminals open from inside a shell script

2010-10-29 Thread sumatheja
Hi All,         I'm can anyone let me know if there's some variable holding the value of the total number of terminals open. I have a requirement where i need to execute some script only first time a terminal is opened. I feel this is not the right place to post this but will be glad if someone can