Operating System - HP-UX
1820072 Members
2588 Online
109608 Solutions
New Discussion юеВ

my .cshrc file contents, I don't know the meaning.

 
David Shao
Advisor

my .cshrc file contents, I don't know the meaning.

In my .cshrc, there are following lines. I don't know the meaning of the 'source' command.
Is it a csh command? I know little about the csh.What's the meaning of 'history' and 'filec' command?
************
if (-f /opt/tmos/etc/setup/sys_adm.cshrc) then
source /opt/tmos/etc/setup/sys_adm.cshrc
endif

set history=140
set filec
**************
in the /opt/tmos/etc/setup/sys_adm.cshrc
there are following lines.
what's the meaning of 'if ( -r \!:1 ) source \!:1 '
#!/bin/csh -f
#
alias do_source 'if ( -r \!:1 ) source \!:1 '
do_source /opt/tmos/etc/setup/tmos.cshrc



David Shao
6 REPLIES 6
Evert Ladrak
Advisor

Re: my .cshrc file contents, I don't know the meaning.

The source command will read the file specified and use it as a csh init file

alias do_source 'if ( -r \!:1 ) source \!:1 ' creates an alias called do_source which takes an parameter. This gets used in the do_source line underneath it. See explanation above.

-ETL
Evert
David Shao
Advisor

Re: my .cshrc file contents, I don't know the meaning.

1.What's the meaning of 'filec' command?
2.what's the meaning of 'if ( -r \!:1 ) source \!:1 '

David Shao
David Shao
Advisor

Re: my .cshrc file contents, I don't know the meaning.

where i can find some useful information about these commands?
David Shao
Michael Tully
Honored Contributor

Re: my .cshrc file contents, I don't know the meaning.

Hi,

Have a look at the 'csh' man page, particularly the areas on 'set'

Regards
Michael
Anyone for a Mutiny ?
T G Manikandan
Honored Contributor

Re: my .cshrc file contents, I don't know the meaning.

filec
This allows the escape key to be used for filename completion in a csh line command.

history
This is to have the history of commands that were used by the user.


source
is used to read a file and execute the commands inside them.



David Shao
Advisor

Re: my .cshrc file contents, I don't know the meaning.

what's the meaning of 'if ( -r \!:1 )
David Shao