Search Results

Search: Posts Made By: Amit Pande
3,935
Posted By Scrutinizer
Perhaps also: awk '$5!~/^[01]$/' file or ...
Perhaps also:
awk '$5!~/^[01]$/' file
or
awk '$5>1' file
3,935
Posted By hawk_eye
Hey Amit, grep doesn't really work on...
Hey Amit,

grep doesn't really work on delimited row data, rather it works as individual character in the file.

in your case awk is always a better approach. You may try the below: (assuming you...
2,972
Posted By jim mcnamara
I think you need to specify a field separator as...
I think you need to specify a field separator as a comma.


Owner@Owner-PC ~
$ awk -F, '!a[$1]++' filename
ENSG00000003137,ENST00000001146
ENSG00000003402,ENST00000309955


Owner@Owner-PC ~...
2,972
Posted By balajesuri
Of course with -F flag: awk -F, '!a[$1]++' file
Of course with -F flag:
awk -F, '!a[$1]++' file
3,935
Posted By apmcd47
Please give an example of what your output should...
Please give an example of what your output should look like. Because the file as listed has 0s and 1s on all lines, and therefore grep as you propose to use it will delete all lines,


Andrew
1,127
Posted By Akshay Hegde
Try $ echo chr6 27262994 27263391 194 | awk...
Try

$ echo chr6 27262994 27263391 194 | awk '$3=$2+$4' OFS=\\t
chr6 27262994 27263188 194OR

if you want to mask column 4 then
$ echo chr6 27262994 27263391 194 | awk...
4,544
Posted By pamu
If you want first column for each entry then just...
If you want first column for each entry then just use..

awk '{for(i=2;i<=NF;i++){if(X[$i,i]++){$i=""}}}1' OFS="\t" file
4,544
Posted By elixir_sinari
Please use code tags to preserve formatting in...
Please use code tags to preserve formatting in the data samples. Your input is barely readable.
That one line? or multiple lines?
What's the expected output?
4,544
Posted By itkamaraj
can you see the below post and use CODE tag ...
can you see the below post and use CODE tag

https://www.unix.com/how-post-unix-linux-forums/167686-forum-video-tutorial-how-use-code-tags.html
Showing results 1 to 9 of 9

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