Calling awk from csh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Calling awk from csh
# 1  
Old 06-29-2010
Calling awk from csh

I am trying to call awk from a csh script using

Code:
awk '{print $1, -$2, $3}' $fvmod.vel > $fvmod.xzv

and getting awk: Command not found.

Running

awk '{print $1, -$2, $3}' $fvmod.vel > $fvmod.xzv

on the command line with the actual filenames works
# 2  
Old 06-29-2010
Did you change $PATH variable during execution of that script?
# 3  
Old 06-29-2010
Power

Quote:
Originally Posted by bartus11
Did you change $PATH variable during execution of that script?
Yeah, forgot I did that.

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk execution problem in csh

This has no error awk '($8==150) && ($4>=11.001 && $4 <= 12) && ($5>=91.001 && $5<=92){print}' OFS="\t" file following are unable to run in csh this is giving error awk: line 1: syntax error at or near not even working in terminal awk '($'$gr'=='$grn') && ($'$ll'>='$Y' && $'$ll' <= '$Ym')... (1 Reply)
Discussion started by: nex_asp
1 Replies

2. Shell Programming and Scripting

Csh variable calling problem

First post on here. So I use csh shells for my research (physics... not a CS person). I am trying to rerun the same scripts, but there are ~10 files that have similar variables that I have to change for each different configuration, so I would like one central file for the variables I change that... (3 Replies)
Discussion started by: sabrepride
3 Replies

3. Shell Programming and Scripting

arithmetic from csh variable passed to awk

I have the following code in a csh script I want to pass the value of the variable sigmasq to the awk script so that I can divide $0 by the value of sigmasq grep "Rms Value" $f.log \ | awk '{ sub(/*:*\.*/,x); \ print... (2 Replies)
Discussion started by: kristinu
2 Replies

4. Shell Programming and Scripting

Calling awk fom csh

I have to call two awk scripts where the second one used the output from the first one. Am wondering if it may happen that the second awk might start before the first awk finished creating the file... if ($nAnomaly == 1) then awk -v anomaly=$Anom -v zloc="$zmin/$zmax" -v dz=$dz \ ... (1 Reply)
Discussion started by: kristinu
1 Replies

5. UNIX for Dummies Questions & Answers

move a variable value from csh to awk ...

Guys, following is my issue: ------------------------ #!/bin/csh # specify a counter @ k = 1 # loop while ($k < 3) # read all text file with a specific number less than 3 in the last column of a record foreach file ( *.txt) # capture the line by passing the column... (1 Reply)
Discussion started by: znbhatti
1 Replies

6. Shell Programming and Scripting

calling csh script from ksh shell

hi, I have a csh script, which has setenv X xyz etc My shell is korn Is there some way I can "source" this to have the variables in my current korn shell? thanks (3 Replies)
Discussion started by: JamesByars
3 Replies

7. Shell Programming and Scripting

AWK in CSH script problems

Hello Guys, I was trying to obtain the information from the /etc/passwd file, here was my script: 38 echo -n "What's your login name? " 39 set logname=$< 40 echo "Your login name is $logname, your user's ID is `grep $logname /etc/passwd|awk -F: '{print $3}'`" 41 echo " Your home dir is... (1 Reply)
Discussion started by: tpltp
1 Replies

8. 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

9. Shell Programming and Scripting

How to plot graph using AWK or CSH?

Hi , i need to plot a x-y axis graph using AWK or CSH. Pls help. The data is as follows: 1 3 2 1 3 4 4 2 5 4 where 1st column refers to x-coordinate and 2nd column refers to y-coordinate. Note that x-coordinate may not be in sequence and the no of set of coordinates is unknown... (3 Replies)
Discussion started by: Raynon
3 Replies

10. Shell Programming and Scripting

Calling C from within a csh script

After I compile a C program, when I run it from a C shell script, it does not print out the results. e.g: myCFile.c: main(){printf("Hey");} myCshScript: myCFile This does not output "Hey" to the terminal window. I am not even sure if it is executed or not. What should I do to see the... (2 Replies)
Discussion started by: barisgultekin
2 Replies
Login or Register to Ask a Question