Search Results

Search: Posts Made By: kayak
962
Posted By jim mcnamara
In any event this is either going to be a memory...
In any event this is either going to be a memory hog, or require two passes thru a file. Neither is a great choice. I'm opting for two passes.

#!/bin/bash
cd /path/to/directory
ls grad*...
6,378
Posted By Don Cragun
In your original problem, each entry in fit.txt...
In your original problem, each entry in fit.txt contained 3 lines that contained the string +/- and the awk script I supplied plucked a value from each of these lines and added a new line after find...
6,378
Posted By Don Cragun
With the sample provided, the following simple...
With the sample provided, the following simple awk script seems to work:
awk -F' *=* +' '/[+]\/-/{printf "%s%s",$2,(++i%3)?" ":"\n"}' fit.txt
If you are using a Solaris/SunOS system, use...
6,378
Posted By hanson44
Here's one possible way: $cat temp.sh sed...
Here's one possible way:

$cat temp.sh
sed -n "/^Final/,/^correlation/ p" infile > temp1.x # get segments
grep "^[a-z]_[0-9][0-9][0-9][0-9] " temp1.x > temp2.x # get lines
sed "s/.* = \([^ ][^...
6,378
Posted By hanson44
For your test input, is this the first line of...
For your test input, is this the first line of output you expect?
0.497897 0.00459204 1.57077
6,378
Posted By Corona688
I see nothing resembling that output in your...
I see nothing resembling that output in your input so am confused to which lines you expect grep to match.
9,290
Posted By sheemam
this should fix ur prob: cat test.dat|awk...
this should fix ur prob:

cat test.dat|awk '$NF~/^20.0)/{print}'
9,290
Posted By sheemam
using awk: cat test.dat|awk '$NF~/20.0)/{print}'
using awk:
cat test.dat|awk '$NF~/20.0)/{print}'
9,290
Posted By Yoda
awk -F, ' { if(match($2,/20.0/)>0) print; } '...
awk -F, ' { if(match($2,/20.0/)>0) print; } ' test.dat
9,290
Posted By pamu
If you want to grep 20 then why you need to...
If you want to grep 20 then why you need to sort...?



Which 20..?
assuming below from 8th column.

$ awk '$3 ~ /20/' file
1000 000008 (93.906141776920549, 90.0)

and

last column

$...
2,959
Posted By Scrutinizer
Did you try cat ?
Did you try cat ?
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 11:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy