LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-07-2012, 01:17 AM   #1
priyach2000
LQ Newbie
 
Registered: Apr 2012
Location: Bangalore, India
Posts: 4

Rep: Reputation: Disabled
Problem with .cshrc file


Hi Earlier I had been trying to install TITAN on a 64 bit system which was not working as most of the libs are required in 32 bit... So I installed a 32 bit ubuntu on my system.

Now I need to source this .cshrc file which shall set the variables for building the libs and the apps of Titan, but I get the same error again and again.

the file to be sourced is :
#########################################
# .cshrc file for TITAN dual-pol project
#########################################

if ( $?prompt ) then
set prompt = "`hostname`:\!>"
set autoexpand
set autolist
set cdpath = ( ~ )
set pushdtohome
endif

unset autologout
set autologout=0

umask 002
setenv TAPE /dev/st0
setenv PRINTER lp

# Set the build environment

setenv LANG C

if ( -f $HOME/.titan_build_env ) then
# file created by sourcing set_build_env
source $HOME/.titan_build_env
else
setenv HOST_OS LINUX
setenv BUILD_DIR /home/titan5/rap
setenv RAP_MAKE_INC_DIR $BUILD_DIR/make_include
setenv RAP_MAKE_BIN_DIR $BUILD_DIR/make_bin
setenv RAP_INC_DIR $BUILD_DIR/include
setenv RAP_LIB_DIR $BUILD_DIR/lib
setenv RAP_BIN_DIR $BUILD_DIR/bin
setenv RAP_MAN_DIR $BUILD_DIR/man
setenv RAP_DOC_DIR $BUILD_DIR/doc
endif

# Note: options for HOST_OS environment variable are
# LINUX
# LINUX_64
# LINUX_64_32MODE
# DARWIN
# CYGWIN

# CVS

setenv CVSUSER titan5
setenv CVSROOT server:${CVSUSER}@localhost:/cvs

# --- OTHER BUILD SETTINGS

setenv QTDIR /usr/local/qt4

setenv RVP8_BIN_DIR $RAP_BIN_DIR
setenv REFR_BIN_DIR $RAP_BIN_DIR

setenv FC gfortran
setenv GCC_WARNINGS -Wall

# --- LD library path --

setenv LD_LIBRARY_PATH $QTDIR/lib:/usr/local/lib

# --- NCAR GRAPHICS ---

setenv NCARG_ROOT /usr/local/ncarg

# --- JAVA ---

setenv JAVA_HOME /usr/java/latest
setenv ANT_HOME /usr/local/ant

# --- RUNTIME ---

setenv DATA_HOST localhost
setenv PROJ_DIR $HOME/projDir
setenv TITAN_HOME $PROJ_DIR
setenv DATA_DIR $PROJ_DIR/data
setenv RAP_DATA_DIR $DATA_DIR
setenv TMP_DIR $DATA_DIR/tmp
setenv LOG_DIR $DATA_DIR/logs
setenv DATA_DISTRIB_LOG_DIR $LOG_DIR/distrib
setenv ERRORS_LOG_DIR $LOG_DIR/errors
setenv RESTART_LOG_DIR $LOG_DIR/restart

setenv PROCMAP_HOST localhost
setenv DATA_MAPPER_ACTIVE true
setenv LDATA_FMQ_ACTIVE true

setenv DS_COMM_TIMEOUT_MSECS 60000
setenv DS_PING_TIMEOUT_MSECS 20000

setenv PAPER_SIZE 500x700+60+60

# --- site info ---

if (-f $PROJ_DIR/system/params/site_params) then
source $PROJ_DIR/system/params/site_params
endif

# --- Path ---

# Assemble path to include all scripts directories
# then projDir/bin, then the rest

set path = (.)
if ( -d $PROJ_DIR ) then
foreach dir ($PROJ_DIR/*)
if (-d $dir/scripts) then
set path = ($path $dir/scripts)
endif
end
endif

if ($?BUILD_DIR) then
if ( -d $BUILD_DIR/bin64 ) then
set path = ($path $BUILD_DIR/bin64)
endif
if ( -d $BUILD_DIR/bin32 ) then
set path = ($path $BUILD_DIR/bin32)
endif
if ( -d $BUILD_DIR/bin ) then
set path = ($path $BUILD_DIR/bin)
endif
endif

set path = ($path ~/bin \
/opt/local/bin \
$JAVA_HOME/bin $ANT_HOME/bin \
$NCARG_ROOT/bin \
/usr/X11R6/bin /usr/sbin /usr/bin /sbin /bin \
/usr/bin/X11 /usr/local/bin /usr/local/sbin \
/opt/gfortran/irun/bin /opt/spol/bin \
/usr/sigmet/bin /usr/sigmet/bin/rda )

# -- core files --
# unlimit coredumpsize

# --- Aliases ---
if ($?prompt) then

alias sc source ~/.cshrc

alias setprompt 'set prompt="(`hostname`) `basename $cwd` ! % "'
alias cd 'cd \!*;setprompt; echo $cwd'
alias push 'pushd \!*; cd .'
alias pop 'popd; cd .'

set prompt = "%m:%~%# " # tcsh
set showdots # tcsh
set watch = (1 root any) # tcsh
set savehist=0
set history=1000
set nobeep
set time = 5

setenv EDITOR emacs
setenv PAGER less
setenv LESS "-cMe"
setenv LESSOPEN "|lesspipe.sh %s"
setenv LESSCHARSET latin1

alias h history
alias ssh 'ssh -X'

alias rm 'rm -i'
alias mv 'mv -i'
alias cp 'cp -i'

alias df 'df -h'
set filec
set fignore = (.o .ln)

alias catw 'cat `which \!*`'
alias lessw 'less `which \!*`'
alias emacsw 'emacs -nw `which \!*`'
alias viw 'vi `which \!*`'

alias lst 'ls -l \!* | awk \{s+=\$4\}END\{print\ s\}'
alias la 'ls -la --color=tty'
alias ll 'ls -l --color=tty'
alias lt 'ls -lt --color=tty'
alias lat 'ls -alt --color=tty'
alias l 'ls -sF'
alias L ls -agl
alias LS ls -aFRts

alias xx 'xrdb ~/.Xdefaults'
alias cvs 'cvs -d server:${CVSUSER}@localhost:/cvs \!*'
alias cvsforward 'ssh -a -x -C -Y -R 2401:localhost:2401'
alias cvsin 'ssh -a -x -C -L 2401:cvs:2401'
alias cvsout 'ssh -a -x -C -R 2401:cvs:2401'
alias gate 'ssh -a -x -C -L 2401:cvs.rap.ucar.edu:2401 titan5@gateway'

alias psg 'ps axww | sed -n "1p; \|sed .*/\!*/|d; /\!*/p"'
alias pslg 'ps alxww | sed -n "1p; \|sed .*/\!*/|d; /\!*/p"'
alias psug 'ps auxww | sed -n "1p; \|sed .*/\!*/|d; /\!*/p"'
alias psx 'ps xww | grep -v LogFilter'
alias ensc 'enscript -2r -fCourier7'

alias print_procmap 'print_procmap -hb -up -status'
alias PrintDataMap 'PrintDataMap -all -relt -lreg'
alias ppm 'print_procmap -hb -up -status'
alias pdm 'PrintDataMap -all -relt -lreg'
alias pcheck 'procmap_list_check -proc_list $PROJ_DIR/control/proc_list'
alias ph 'get_host_type'

# save to dvd

alias savedvd 'growisofs -Z /dev/dvd -r -J'
alias saveiso2dvd 'growisofs -dvd-compat -Z /dev/dvd='

# eval `dircolors ~/.dircolors` # Set up color-ls variables.

endif


and the error i get when I source this file is:

bash: /home/bhat/.cshrc: line 9: syntax error near unexpected token `('
bash: /home/bhat/.cshrc: line 9: ` set cdpath = ( ~ )'


can anyone help me correct this...
 
Old 05-07-2012, 01:48 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
How did you get bash to evaluate cshrc?
 
Old 05-07-2012, 02:06 AM   #3
priyach2000
LQ Newbie
 
Registered: Apr 2012
Location: Bangalore, India
Posts: 4

Original Poster
Rep: Reputation: Disabled
I am not very sure as to what you are asking?
 
Old 05-07-2012, 03:05 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
Quote:
Originally Posted by priyach2000 View Post
I am not very sure as to what you are asking?
Quote:
Code:
bash: /home/bhat/.cshrc: line 9: syntax error near unexpected token `('
THAT. you're trying to run/source a .cshrc file with bash. That's bound
to fail.
 
Old 05-07-2012, 03:13 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141
Quote:
Originally Posted by priyach2000 View Post
Hi Earlier I had been trying to install TITAN on a 64 bit system which was not working as most of the libs are required in 32 bit...
You do know that you can install 32 bit libraries on a 64 bit OS right? You just can't install 64 bit libraries on a 32 bit OS.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Any tips on alias commands in .cshrc file please? hotspur919 Linux - Newbie 1 01-15-2011 04:57 PM
why to commit .cshrc "source .cshrc" file in every new shell session simer_anand88 Mandriva 3 10-23-2009 09:44 AM
Is it possible to write functions for a .cshrc file? pwc101 Linux - Software 1 11-02-2007 11:48 AM
The .cshrc file is missing from the user homedir vut Linux - Software 1 11-23-2004 08:28 AM
Where is the.cshrc file in mandrake10.0? lbabey Linux - Newbie 1 11-08-2004 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration