Search Results

Search: Posts Made By: jacobs.smith
10,039
Posted By jacobs.smith
Hi Don, I did try this from an online search...
Hi Don,

I did try this from an online search

awk 'cnt[$2]++{$2=$2":::"cnt[$2]-1} 1'

But it doesn't take the plus or minus sign into consideration.
10,039
Posted By jacobs.smith
Rename with a different condition
Hello

I have a file like this

a aa:::+
b aa:::+
c aa:::-
d ab:::+
e ab:::+
f ac:::+
g ac:::+
h ac:::-


Desired output


a aa:::+
b aa:::+
c aa.1:::-
10,046
Posted By jacobs.smith
Exactly what I was looking for. Thank you...
Exactly what I was looking for. Thank you @Scrutinizer
10,046
Posted By jacobs.smith
sed replace file contents by reading from another file
Hello,

My input file1 is like this by tab-delimited

chr1 mm10_knownGene stop_codon 3216022 3216024 0.000000 - . gene_id "uc007aeu.1"; transcript_id "uc007aeu.1"; ...
14,565
Posted By jacobs.smith
Thank you all. The developer replied back...
Thank you all.

The developer replied back with an alternate solution.

In 8.4 version of split, there is no option of -n.

Thanks
14,565
Posted By jacobs.smith
Split "-n" unknown option
Hello,

I am trying to run a third party script. I have no idea what is the purpose of this below split command. But it throws an error saying invalid option -n.

Please comment.


cat input...
5,072
Posted By jacobs.smith
awk (or) UNIX random RGB colors generator?
Dear UNIX Friends,

I was wondering if there is a random RGB color generator or any function in any unix platforms.

Please share your ideas.

Thanks
3,506
Posted By jacobs.smith
All I can access it is for execution only. I...
All I can access it is for execution only.

I cannot edit it.
3,506
Posted By jacobs.smith
But the script is designed to take inputs from...
But the script is designed to take inputs from the terminal itself.

Do you know of a way where I can run a python command on multiple processors instead of one?

Thank you for your time R.Singh.
2,369
Posted By jacobs.smith
Are there dashes at least? If so, please try...
Are there dashes at least?

If so, please try to edit Rudic's command to suit that pattern.
3,506
Posted By jacobs.smith
Python GNU parallel single command on multiple cores
Hello,

I have a 4 core machine.

Here is my initial script

cd /work/
python script.py input.txt output.txt 1 2 3

This script runs for 1.5hrs.

So I read across the web and figured out...
21,650
Posted By jacobs.smith
Hi R.Singh, I checked it with the input...
Hi R.Singh,

I checked it with the input file.

But the number of lines in the output.txt doesn't reach to be 127.

I guess, it is printing only the values where there is a common or unique...
21,650
Posted By jacobs.smith
You are a legend R.Singh. Thank you!
You are a legend R.Singh. Thank you!
21,650
Posted By jacobs.smith
Thanks Rudic. But I would like to make it...
Thanks Rudic.

But I would like to make it dynamic.

The post example has 3 sets. But my actual input file has numerous sets.

Can you please share any comments on how I can edit your solution?
21,650
Posted By jacobs.smith
I am loving your questions. Glad to learn. ...
I am loving your questions.

Glad to learn.

Here is a way I tried. But it has two disadvantages.

One - I can only do three sets. But my actual input has 7 and even more.

Two - I cannot...
21,650
Posted By jacobs.smith
My apologies Rudic. If the value is "1" in...
My apologies Rudic.

If the value is "1" in any set, that means a presence of value and it should be counted.

If the value is "0" in any set, that means an absent and it should not be counted.
...
21,650
Posted By jacobs.smith
Thank you folks - @Yoda @RavinderSingh13 and...
Thank you folks - @Yoda @RavinderSingh13 and @Rudic.

Can I also get the intersection list into another file?

Intersectionlist.txt
Set1_unique=2
Set2_unique=1
Set3_unique=2
Set12_common=1...
21,650
Posted By jacobs.smith
Venn Data Maker
Hi,

My input is like this

head input.txt
Set1,Set2,Set3
g1,g2,g3
g2,g1,g3,
g4,g5,g5
g1,g1,g1,
g2,g1,g1,
g6,g7,g8
,g7,g8
,,g8


My output file should be

Name,Set1,Set2,Set3...
2,728
Posted By jacobs.smith
Amazing! Thank you!
Amazing! Thank you!
2,728
Posted By jacobs.smith
Thank you @Corona688. I had that doubt in mind. ...
Thank you @Corona688. I had that doubt in mind.

But I would like to see only the pattern and the line before it. Can you please share any comments?
2,728
Posted By jacobs.smith
Grep pattern only and surrounding lines
Hello,

I am trying to grep search a pattern and a line before it.

cat input
>record1
hello1hello2hellonhello3
>record2
helloohello1hello2hello3

When I use, grep with -o option and either...
10,180
Posted By jacobs.smith
Don, Thank you. You are really a Don!!!! ...
Don, Thank you.

You are really a Don!!!!

Your counting at the end is much more comprehensive than what I had thought.

It's all biology related. Definitely real time. Thank you.

I will be...
10,180
Posted By jacobs.smith
Read values in each col starting 3rd row.Print occurrence value.
Hello Friends,

Hope all are doing fine.

Here is a tricky issue.

my input file is like this
07 10 14 20 21
03 15 27 30 32
01 10 11 19 30
02 06 14 15 17
01 06 20 25 29



Logic:
1....
17,755
Posted By jacobs.smith
Thanks Rudic. It all worked well. I...
Thanks Rudic.

It all worked well.

I transferred another 1000 bits to you just now. Please check it. Happy weekend.
17,755
Posted By jacobs.smith
Hi Rudic, For some of the files, I am seeing...
Hi Rudic,

For some of the files, I am seeing this error with the first long code

awk: division by zero
input record number 2, file
source line number 27

Any thoughts?

But the paste...
Showing results 1 to 25 of 363

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