Search Results

Search: Posts Made By: kasan0
8,435
Posted By kasan0
Thanks Smilesavvy, Unfortunately this...
Thanks Smilesavvy,

Unfortunately this doesn't give me quite what I want. The output it gives is as follows:

12350 1 2 1 2 2 2
12349 0 0 2 2 1 2
12345 1 2 2 2 0 0


It doesn't seem to be...
8,435
Posted By kasan0
Sorting data in file based on field in another file
Hi,

I have two files, one of which I would like to sort based on the order of the data in the second. I would like to do this using a simple unix statement.

My two files as follows:

...
2,848
Posted By kasan0
Combine two awk statements into one
Hi,

I have the following two awk statements which I'd like to consolidate into one by piping the output from the first into the second awk statement (rather than having to write kat.txt out to a...
1,490
Posted By kasan0
Thanks very much. That works perfectly!
Thanks very much. That works perfectly!
1,490
Posted By kasan0
[Solved] Using awk to obtain minimum of each column (ignoring zeros)
Hi,

I have a wide and long dataset which looks as follows:

0 3 4 2 3 0 2 2 ...
3 2 4 0 2 2 2 3 ...
0 3 4 2 0 4 4 4 ...
3 0 4 2 2 4 2 4 ...
....


I would like to obtain the minimum of...
1,123
Posted By kasan0
Thanks for that. Sorry though I wasn't entirely...
Thanks for that. Sorry though I wasn't entirely clear about what I was after.

I've extended the size of my file as below to make it clearer:

0 3 4 2 0 2 2 4...
3 2 4 0 0 4 2 2...
0 3 4 2 2...
1,123
Posted By kasan0
Using awk/sed to determine whether there are any 2's, 3's and 4's in a column
Hi,

I have a very large file which is of the general format:

0 3 4 2 ...
3 2 4 0 ...
0 3 4 2 ...
3 0 4 2 ...
. . . . ...
. . . . ...

I would like to apply a simple awk/sed script to...
2,926
Posted By kasan0
Thanks very much for that. I've since found out...
Thanks very much for that. I've since found out that the problem is slightly different from what I thought so I'm going to re-post. I will try your code out though as it looks like it would be...
2,926
Posted By kasan0
awk code to process column pairs and find those with more than 1 set of possible values
Hi,

I have a very wide dataset with pairs of columns starting from column 7 onwards (see example below).

0 123456 -1 0 0 -9 0 0 1 2 2 2 1 1 1 1 2 2...
0 123457 -1 0 0 -9 1 2 1 1 2 2 0 0 0 0...
2,654
Posted By kasan0
Many thanks for the responses. I've...
Many thanks for the responses.
I've implemented the paste/awk script which works well as my file is very wide. I also piped the results and applied sed 's/.$//' before writing it to output. This...
2,654
Posted By kasan0
Compare two flat files and update one based on the values in the other
Hi,
I'm a newbie to scripting and am trying to compare two files using awk.

The files are exactly the same dimensions. Where the first file has 0's I would like to create an updated version of...
Showing results 1 to 11 of 11

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