Running a program using csh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Running a program using csh
# 1  
Old 09-13-2010
Running a program using csh

I have a program which I can run on the command line like below and works fine

Code:
  /nethome/chrisd/HSeis/TommyCD/TommyCD-1101/bin/raytrac vmod=npt10-z30.vmod srfile=jcdint.sc rcfile=jcdint.rc  phases="SP FS" level=twop format="X T"  dtau=0.1 mdacc=0.5 mindist=0.1  maxitertp=25 ray=npt10-z30.ry out=npt10-z30.tx vrb=medium |& tee npt10-z30.log

However when I put the command in csh I get an error when the program processes phases="SP FS" and format="X T".

No clue what causes the problem

I put every entry in a variable and try to run the program as below which does not work

Code:
  $tpath/raytrac $vmod $srfile $rcfile $phases $level $format  $dtau $mdacc $mindist $maxitertp $ray $out $vrb |& tee $frtlog


If I use the following, everything works fine

Code:
$tpath/raytrac $vmod $srfile $rcfile phases="SP FS" $level format="X T"  $dtau $mdacc $mindist $maxitertp $ray $out $vrb |& tee $frtlog

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Linux csh script going to Suspended (tty output) when running with & (bg)

i have strange behavior i have csh file that run java process something like this : run_server.csh #!/usr/bin/tcsh java -Dtest=testparam -cp ${TEST}/lib/device.jar:${TEST}/conf:${TEST}/lib/commons-logging-1.1.1.jar com.device.server when i run it like this :... (7 Replies)
Discussion started by: umen
7 Replies

2. Shell Programming and Scripting

Selecting files from a list and passing them to a program using csh

I have a list of files, example as shown below n02-z30-dsr65-ndelt0.25-varp0.002-4x3drw-csq.msf n02-z30-dsr65-ndelt0.25-varp0.004-4x3drw-csq.msf n02-z30-dsr65-ndelt0.25-varp0.006-4x3drw-csq.msf n02-z30-dsr65-ndelt0.25-varp0.008-4x3drw-csq.msf... (8 Replies)
Discussion started by: kristinu
8 Replies

3. Shell Programming and Scripting

Command not found errors when running csh script

I am trying to find the number of files whose name starts with uni. Below is the code but it is giving error. :confused: #!/bin/csh FILES_NAME ='files_list'; FILE_NAME_PATTERN = 'uni*'; NO_OF_FILES; ls -l $FILE_NAME_PATTERN > $FILES_NAME ; NO_OF_FILES = `wc -l $FILES_NAME`; echo... (3 Replies)
Discussion started by: hiten.r.chauhan
3 Replies

4. UNIX for Dummies Questions & Answers

Running CSh scripts in Bash

Hi, I have some csh scripts and I want to run them in .bashrc. I use these techniques without any success: . test.csh or csh test.csh The first one assumed that the scripts is a bash script, so showed me errors. The second one finished without giving proper result. Can anybody offer... (6 Replies)
Discussion started by: mjdousti
6 Replies

5. UNIX for Dummies Questions & Answers

Kill a running program?

Hello i'm trying to make a program which can find a running program on the system and kill it, then repeat that every 5 minutes. The name of the process is given with an argument. I have done this so far, but still not working. if $1 in $(ps -e) ; then kill $(pidof $1) sleep 5m fi (3 Replies)
Discussion started by: petel1
3 Replies

6. Shell Programming and Scripting

Help with Running More than One Program

Folks, I'm really new to scripting and was wondering if you could help me out. I have the following script that I inherited: #!/bin/bash # # Usage # From the agent directory: # ./run-any-agent AgentName # TAC_AGENT_HOME=`pwd` LIB=${TAC_AGENT_HOME}/lib CLASSPATH=.... (17 Replies)
Discussion started by: DTriniWay
17 Replies

7. Shell Programming and Scripting

how to call awk in a csh Program

Hi Friends, Could you pleas help me out.. I have an awk program which works fine while running it in the command prompt. The awk program is =============== awk 'BEGIN { format="head -%d M2_Sales_N01.txt |tail -%d >M2_Sales_N01_%02d.txt\n" n=0 m=0 } { if (n==0) { tmp=$1 n=1 }... (5 Replies)
Discussion started by: bikas_jena
5 Replies

8. UNIX for Dummies Questions & Answers

Running a program on boot!

Hi there! I tried to search for something like this here but couldn't find anything. I need to run a specific program when linux starts up. I need to run it after the rp-pppoe has started because this prog needs internet connection. I start the program by entering ./dynix start (its in my home... (4 Replies)
Discussion started by: D-Lexy
4 Replies

9. UNIX for Dummies Questions & Answers

Running a program

Hi.Iam new to Linux.i got linux 7.0 pro and dont know how to run programs. I want a perl interputer and i know i installed one but how do i run it ??? Also how do i run a C or C++ editor ?and how do i run cron ? (3 Replies)
Discussion started by: perleo
3 Replies

10. Programming

running a c/c++ program in unix

This is not a question, but rather a simple how-to for programmers who are new to the UNIX environment. I too,am new to UNIX. First I developed a few programs on my box and perfected them until they were satisfactory for execution. Problem was however, that once i compiled and all that,... (2 Replies)
Discussion started by: kray
2 Replies
Login or Register to Ask a Question