Search Results

Search: Posts Made By: huiyee1
1,919
Posted By huiyee1
Dear Scrutinizer, Thanks for your reply. ...
Dear Scrutinizer,

Thanks for your reply.

I am trying to count the occurrences matching the content of 8th field and 9th field respectively.

Input:...
1,919
Posted By huiyee1
Code for exact match to count occurrence
Hi all,

I have an input file as below. I would like to count the occurrence of pattern matching 8th field for each line.

Input:
field_01 field_02 field_03 field_04 ...
1,262
Posted By huiyee1
Hi disedorgue and RudiC, I need to add in...
Hi disedorgue and RudiC,

I need to add in one more condition another input file as follows,
if field4≠field5 and field4≠NN and field5≠NN, print NN

Input2:
...
1,262
Posted By huiyee1
awk to match field4 and field5, field6 and field7, field8 and field9 and so on.
Hi all,

I want to match field4 and field5, field6 and field7, field8 and field9 and so on using the following input file.

Condition:
if field4=field5, print field4
if field4=NN and...
2,727
Posted By huiyee1
I have tried a few codes. But these codes...
I have tried a few codes. But these codes involved separate commands

To generate the first output file:
cat input | rev | cut -d"_" -f1 | rev > last_field #this generates file containing the...
2,727
Posted By huiyee1
How to target certain delimiter to split text file?
Hi, all.

I have an input file. I would like to generate 3 types of output files.

Input:

LG10_PM_map_19_LEnd_1000560
LG10_PM_map_6-1_27101856
LG10_PM_map_71_REnd_20597718...
1,404
Posted By huiyee1
How to remove duplicated column in a text file?
Dear all,

How can I remove duplicated column in a text file?

Input:

LG10_PM_map_19_LEnd 1000560 G AA AA AA AA AA GG
LG10_PM_map_19_LEnd 1005621 G GG GG GG AA AA GG...
2,598
Posted By huiyee1
Thanks everyone.
Thanks everyone.
2,598
Posted By huiyee1
How to remove empty field in a text file?
Hi all,

I want to remove empty field in a text file. I tried to used sed. But it failed.

Input:

LG10_PM_map_19_LEnd 1000560 G AG AG
LG10_PM_map_19_LEnd 1005621 G AG ...
2,501
Posted By huiyee1
How to split all columns into multiple columns?
Hi, all.

How can I split all columns into multiple columns separated by tab?

Input:

qq ee TT 12 m1
aa gg GG 34 2u
zz dd hh 56 4h
ww cc JJ 78 5y
ss ff kk 90 j8
xx pp mm 13 p0

...
2,562
Posted By huiyee1
I have found the solution. sed "N;/\nN/d"...
I have found the solution.

sed "N;/\nN/d" input.txt
2,562
Posted By huiyee1
How to delete lines starting with specific string?
Dear all,

I would like to delete even lines starting with "N" together with their respective titles which are actually odd lines.

Below is the example of input file. I would like to remove line...
1,911
Posted By huiyee1
Dear rbatte I modify the input file and...
Dear rbatte

I modify the input file and output file to make it easier to see. Both are tab-delimited files and blank columns are indicated by <Blank>. Basically, I have an original table...
1,911
Posted By huiyee1
Dear CarloM, It does not work. But, I...
Dear CarloM,

It does not work. But, I appreciate your help.

Thanks.
1,911
Posted By huiyee1
The one in red is column 2. The full rows, column...
The one in red is column 2. The full rows, column 2 is blank. Sorry for the confusion.
1,911
Posted By huiyee1
Dear CarloM, For some rows, column 2 is...
Dear CarloM,

For some rows, column 2 is blank. For some some rows, column 1, 3, 4, 5, 6, 7, 8, 12, 13 are blank.
1,911
Posted By huiyee1
How to sort a text file if certain columns are blank?
Dear all,

I am trying to sort a text file based on column 3, 10, 11 and 12. But certain column are blank for some lines. Column 3 has to be in ascending order after sorting.

Part of my input...
1,961
Posted By huiyee1
How to print line starting with certain string together with its following line?
Dear all,

How can I print line starting with certain string together with its following line. Example is as follows:

Input file:

@M01596:22:000000000-A7YH7:1:1101:16615:1070 2:N:0:1...
1,909
Posted By huiyee1
Dear ahamed101, I mean 3rd, 6th, 9th, 12th,...
Dear ahamed101,

I mean 3rd, 6th, 9th, 12th, 15th line and so on. Thanks. It is solved.
1,909
Posted By huiyee1
How to delete line number 3,6,9,12,15 and so on?
Hello,

How can I remove line number 3,6,9,12,15,18 and so on for a text file using sed? The line number pattern is multiple 3.

Thanks in advance.
2,489
Posted By huiyee1
Dear all, I figure it out with perl perl...
Dear all,

I figure it out with perl
perl -pe 's/([^\s]+)\s+([^\s]+)/$1:$2/g' input_file

---------- Post updated at 08:28 AM ---------- Previous update was at 08:21 AM ----------




Dear...
2,489
Posted By huiyee1
Dear Subbeh, Thanks for your help. But, it...
Dear Subbeh,

Thanks for your help. But, it does not work.
2,489
Posted By huiyee1
Dear all, Thank for the code. I know it can...
Dear all,

Thank for the code. I know it can be done with awk. However, I have to concatenate for 200,000 columns. Is there any code to concatenate all 200,000 columns?


Many thanks.:)
2,489
Posted By huiyee1
How to concatenate 2-columns by 2 -columns for a text file?
Hello,

I want to concatenate 2-columns by 2-columns separated by colon. How can I do so? For example, I have a text file containing 6 columns separated by tab. I want to concatenate column 1 and...
Showing results 1 to 24 of 24

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