# How do I change my .tcshrc file?



## EJF (Nov 27, 2005)

I am starting to use a Fortran compiler (from Absoft) on my Mac, which runs on Tiger. I got a message that says "return code (11)". From Googling around, I gather that that means that I have to increase my "stack size" and that I can do this by going to my .tcshrc file and changing my .tcshrc file to include "limit stacksize unlimited" (http://www.absoft.com/Support/FAQ/macosx92faq.html). Unfortunately, I can't find my .tcshrc file. Can anyone help me out with this? 

Thanks. 

Eric


----------



## sourcehound (Nov 27, 2005)

EJF said:
			
		

> I am starting to use a Fortran compiler (from Absoft) on my Mac, which runs on Tiger. I got a message that says "return code (11)". From Googling around, I gather that that means that I have to increase my "stack size" and that I can do this by going to my .tcshrc file and changing my .tcshrc file to include "limit stacksize unlimited" (http://www.absoft.com/Support/FAQ/macosx92faq.html). Unfortunately, I can't find my .tcshrc file. Can anyone help me out with this?
> 
> Thanks.
> 
> Eric



Tiger uses bash as the default shell, not tcsh. If you want to use tcsh, simply type "tcsh" at the command prompt. Then, while in your home directory, simply issue "touch .tcshrc" and then "echo 'limit stacksize unlimited' > .tcshrc

Quit Terminal, type tcsh at the prompt, and it should read the .tcsh file for you.


----------



## EJF (Nov 27, 2005)

sourcehound said:
			
		

> Tiger uses bash as the default shell, not tcsh. If you want to use tcsh, simply type "tcsh" at the command prompt. Then, while in your home directory, simply issue "touch .tcshrc" and then "echo 'limit stacksize unlimited' > .tcshrc
> 
> Quit Terminal, type tcsh at the prompt, and it should read the .tcsh file for you.



Thanks for the reply. 

I know almost nothing about any of this stuff and suspect that I may have asked the wrong question. Would it be more logical for me to try to increase my stack size by changing something in bash rather than in tcsh? My understanding of these issues is close to zero, e.g. I have only a very shaky understanding of what a shell is, and I don't know what stack size is. My background in programming consists solely of having written a lot of Perl scripts. I want to fix this current problem in the way that would be most likely to be compatible with what this Fortran compiler assumes I have done. 

Thanks again for the help. 

Eric


----------



## sourcehound (Nov 27, 2005)

Try creating the .bash_profile file and editing that instead of .tcshrc, that ***should*** work for you.

man bash for more info....



			
				EJF said:
			
		

> Thanks for the reply.
> 
> I know almost nothing about any of this stuff and suspect that I may have asked the wrong question. Would it be more logical for me to try to increase my stack size by changing something in bash rather than in tcsh? My understanding of these issues is close to zero, e.g. I have only a very shaky understanding of what a shell is, and I don't know what stack size is. My background in programming consists solely of having written a lot of Perl scripts. I want to fix this current problem in the way that would be most likely to be compatible with what this Fortran compiler assumes I have done.
> 
> ...


----------



## EJF (Nov 27, 2005)

sourcehound said:
			
		

> Try creating the .bash_profile file and editing that instead of .tcshrc, that ***should*** work for you.
> 
> man bash for more info....



I looked at man bash, but it's assuming more knowledge than I have. 

Is there a file on my computer called ".bash_profile" that I can open up and change? If so, is it something that I can get to by double-clicking on a series of folders or is it something I have to access only by using the terminal? I know how to read things using the terminal and I know how to run Perl scripts from the terminal, but that's about it - I don't know how to alter files from the terminal, so I'd rather be able to just double click files and alter them directly. 

Thanks. 

Eric


----------



## sourcehound (Nov 27, 2005)

EJF said:
			
		

> I looked at man bash, but it's assuming more knowledge than I have.
> 
> Is there a file on my computer called ".bash_profile" that I can open up and change? If so, is it something that I can get to by double-clicking on a series of folders or is it something I have to access only by using the terminal? I know how to read things using the terminal and I know how to run Perl scripts from the terminal, but that's about it - I don't know how to alter files from the terminal, so I'd rather be able to just double click files and alter them directly.
> 
> ...



If you want to edit invisible system files like the .bash_profile file (you have to create it, just follow the same instructions I gave before:

1. Open Terminal
2. do "touch .bash_profile"
3. echo 'the string you got from that site'
4. log out and back in

If you're working with compilers on OS X, you have to make your peace with the Terminal. The only other recourse would be to use a programmer's text editor like BBedit or TextWranger, but working with the Terminal is real simple and very rewarding. You will need that skill.


----------



## EJF (Nov 27, 2005)

sourcehound said:
			
		

> If you want to edit invisible system files like the .bash_profile file (you have to create it, just follow the same instructions I gave before:
> 
> 1. Open Terminal
> 2. do "touch .bash_profile"
> ...



Thanks, Sourcehound! 

It seems to have worked. I opened the terminal, logged on as the "super user" (figuring that that would be required to give me the privelige to change things like that), typed "touch .bash_profile", typed "echo 'limit stacksize unlimited'", exited the super user mode, typed "ls -la", saw .bash_profile listed (I'm pretty sure it wasn't there before), typed "head -200 .bash_profile" (wanting to look at the first 200 lines) and saw "limit stacksize unlimited". So I guess I have an invisible file called ".bash_profile" that contains only this single line. 

Unfortunately, it didn't fix my problem. I went back to the Fortran compiler and tried to run the program, but it still gave me the same error message. Still, it's a step forward. I went out and picked up a copy of "UNIX for Dummies" to try to learn some of the basics. I see that they have a discussion of what shells are, though they don't list either "touch" or "echo" in the index. I'll read through part of this to see if it clears up some of the basics for me. 

Thanks again for the help. 

Eric


----------

