10 More Discussions You Might Find Interesting
1. What is on Your Mind?
Not sure if this should be in the Programming forum so placed here for safety...
I used to really love Python, but as it has evolved from V1.4.0, (for the classic AMIGA in my case), to its present V3.4.? incarnation has it become less user friendly for newbie and amateur coders?
I have... (6 Replies)
Discussion started by: wisecracker
6 Replies
2. Shell Programming and Scripting
I have the following script set up and working properly in bash. It basically copies a set of lines which match "AS1100002" from one file and replaces the same lines in another file.
awk -vN=AS1100002* 'NR==FNR { if($1 ~ N)K=$0; next }
{ if($1 in K) $0=K; print }' $datadir/file1... (7 Replies)
Discussion started by: ncwxpanther
7 Replies
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
Please suggest a method (in c shell or any other shell) to implement following:
-To read file1.txt (sample file1 given below)
-To save name field in a variable <name>
-To save parameter field in a variable <parameter>
for ex. let a line in file1.txt be :
bill height weight
the extracted... (12 Replies)
Discussion started by: animesharma
12 Replies
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
I am trying to call awk from a csh script using
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 Replies)
Discussion started by: kristinu
2 Replies
8. UNIX for Dummies Questions & Answers
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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