flags inside .cshrc


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers flags inside .cshrc
# 1  
Old 08-02-2008
flags inside .cshrc

Hi,

I use a specific utility in my .cshrc for setting up the right fonts and I believe it's sufficient to run it once for a whole session.

Since I have sourced it in my .cshrc, it runs every time I do a source of .cshrc or invoke every new terminal.

To resolve this issue, I thought of setting a variable using setenv during the first run and avoid running the utility every time.

Can someone help me with the command I need to put in the .cshrc?

Thanks,
Old..
# 2  
Old 08-03-2008
Java

Code:
...
if [ -z "$FLAG" ]
then
  /run/your/utility
  setenv FLAG 1
fi
...

My c shell has gotten a tad weak of late so there might be some syntax issues there but you get the general idea Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

CSHRC and PATH problem please help

I'm doing some IVR programming and it uses Solaris 10. I know little about Unix, or CSH, but I think it's a problem with my .cshrc file. I was getting an error: "nstancehomedir/sqllib/bin/db2fupdt: Command not found" and also "set: Syntax error" when I log in. I found db2fupdt in 2 directories,... (2 Replies)
Discussion started by: jstevanus
2 Replies

2. Shell Programming and Scripting

Source.cshrc file inside Perl

I have a file which is basically .cshrc It contains lines such as: setenv <variable> <value>... set path=(<dir> <dir>) source <another_file>... (1 Reply)
Discussion started by: kshitij
1 Replies

3. Solaris

Explain @(#)cshrc 1.11 89/11/29 SMI

What does ' @(#)cshrc 1.11 89/11/29 SMI ' mean? Can someone please deconstruct and explain the parts? # @(#)cshrc 1.11 89/11/29 SMIIt is at the top of a the .cshrc of a new Solaris account I am working on. I am familiar with using the first line of a script for setting the program/shell to... (2 Replies)
Discussion started by: fgrirx
2 Replies

4. UNIX for Dummies Questions & Answers

WHat are flags?

Can anybody actually tell, what is flag? I know they are termed as permission flags and various others. Please explain (3 Replies)
Discussion started by: nixhead
3 Replies

5. Shell Programming and Scripting

Problem with my .cshrc

Hello everyone, I write a ~/.cshrc for set class path to run my java application. The file is listed below. setenv YFILTER_HOME ~/yfilter-2.0 setenv PATH "$YFILTER_HOME/bin:$PATH" setenv CLASSPATH... (1 Reply)
Discussion started by: perl0101
1 Replies

6. Virtualization and Cloud Computing

.cshrc file

Hi All, I was hoping someone could help me with the following query I have please in relation to NX Nomachine. Is there a way to get my .cshrc file in say my “US” home dir” to run when I login to another server e.g say a UK server? Any advise would be much appreciated, thanks (3 Replies)
Discussion started by: zainster
3 Replies

7. UNIX for Dummies Questions & Answers

doubt in .cshrc

what kind of information is there .cshrc ? I want to set an alias in the form of =>#alias setprompt 'set prompt=">>$user<<@`hostname`:${cwd}% "' Ex. alias pr 'cd /home/username' when I make the change and try to do $pr ... its saying pr: command not found Is there any way I can... (0 Replies)
Discussion started by: priyam
0 Replies

8. UNIX for Dummies Questions & Answers

.cshrc flie help

How can I set up my .cshrc file to do as the posix shell does the escape+k to scroll my command history Thanks Oh BTW, Hi I'm new to the forum. (2 Replies)
Discussion started by: Lefty
2 Replies

9. Shell Programming and Scripting

cshrc

where are my .cshrc files ? (4 Replies)
Discussion started by: cubicle^dweller
4 Replies

10. UNIX for Dummies Questions & Answers

if flags

Hi folks. I'm just starting to teach myself shell scripting and am having some trouble with an if statement. I am working with a directory where only one file will reside at a time and need to evaluate if this file is compressed to determine subsequent steps. I'm using echo for testing purposes.... (2 Replies)
Discussion started by: kristy
2 Replies
Login or Register to Ask a Question