Search Results

Search: Posts Made By: awknerd
2,077
Posted By awknerd
Thanks you very much!
Thanks you very much!
5,048
Posted By awknerd
Manipulating Data
Hi. I haven't had to write bash scripts in a long time and have a simple task to do, but need some help:

Input:

chrY:22627291-22651542
chrY:23045932-23070172
chrY:23684890-23696359...
2,077
Posted By awknerd
2,740
Posted By awknerd
Wow, thank you. That was a very elegant solution.
Wow, thank you. That was a very elegant solution.
2,740
Posted By awknerd
Substring HELP!
Hi,

I am trying to do something which I thought was very simple but still being a beginner, has proved not to be.

Input:

val1 val2 val3 val4 val5 val6
.
.
.
etc

Desired Output:
...
1,416
Posted By awknerd
Great! It's just supposed to be "printf" not...
Great! It's just supposed to be "printf" not "print" and a \n somewhere. Thanks!
1,416
Posted By awknerd
Thanks, I'm getting an error for line 6: ...
Thanks,
I'm getting an error for line 6:
try1.sh: line 6: print: command not found

Trying to fix it now..
1,416
Posted By awknerd
Need Help Comparing two Files
I really need help on creating a script that does the following:

I have one file (File 1) with lines in the following format:

Name.maf score1 score2


I have a second file (File 2) with...
1,743
Posted By awknerd
Need Help Comparing two Files
I really need help on creating a script that does the following:

I have one file (File 1) with lines in the following format:

Name.maf score1 score2


I have a second file (File 2) with...
1,758
Posted By awknerd
Creating Job List: Print error
I have a very simple script here who's output is supposed to be a text file containing the same command applied to different files. Here it is:

#!/bin/bash
for f1 in newEN*bloc
do
...
2,364
Posted By awknerd
Worked for me..
It works for me..I changed the code I originally posted. Maybe you will try again and see that it works.. hopefully! I just tried it again and it gave me the right output:


chr7 27104483...
2,364
Posted By awknerd
Woops! Here is the code I used: awk '1 == NR...
Woops! Here is the code I used:

awk '1 == NR || $NF >= 1000 {
if (c) print _, __, ___
_ = $1 FS $2
c = 1
i+=1
}

{ __ = $3; ___ = substr($4, 1, 6)"Cluster"i }
END {
print _,...
2,364
Posted By awknerd
Thanks! I messed around with the incrementing a...
Thanks! I messed around with the incrementing a bit more but it worked in the end.
2,364
Posted By awknerd
Creating/ammending Name Column in existing .txt file
With the help of this forum, I have a script with the following output:

chr7 27104483 27105154
chr7 27106872 27110789
chr7 27111956 27112830
chr7 27114388 27125180
chr7 27126966 27131260...
3,367
Posted By awknerd
Thanks. I didn't realize that copying and pasting...
Thanks. I didn't realize that copying and pasting onto a WordPad document then saving it as .txt, then doing dos2unix file.txt didn't work. So I tried pasting it just to notepad, doing dos2unix on...
3,367
Posted By awknerd
It worked! I was having copy and pasting...
It worked! I was having copy and pasting problems..
3,367
Posted By awknerd
It WORKED! Thanks so much!! The way you had it...
It WORKED! Thanks so much!! The way you had it was perfect, for some reason, it just had problems when I cut and paste it, and use dos2unix. But in the end, it worked. Thank you!
3,367
Posted By awknerd
I'm a begginer awk user and not sure how to use...
I'm a begginer awk user and not sure how to use nawk. Is there a way to make the first code work for awk?
O, and your output was correct. I didn't treat the last line correctly!
3,367
Posted By awknerd
INPUT: Use distance <=1000 to merge chr7...
INPUT: Use distance <=1000 to merge

chr7 27104483 27104633 ENm010Block71 150 0
chr7 27104634 27104812 ENm010Block72 178 0
chr7 27104813 27105154 ENm010Block73 341 0
chr7 27106872 27106977...
3,367
Posted By awknerd
Sure! This may take me a little while since I'm...
Sure! This may take me a little while since I'm doing it manually, but it should be up in about 15 minutes. Thanks for your interest! :)
3,367
Posted By awknerd
No, actually I meant to put the original ...
No, actually I meant to put the original
27420972

because the next distance is <=4000 as well, so those two would get merged as well. See, when you have several distances<=4000 consecutively,...
3,367
Posted By awknerd
Urgent Need Help! Merging lines in .txt file
I need to write a script that reads through an input .txt file and replaces the end value with the end value of the next line for lines that have distance <=4000. The first label line is not actually...
Showing results 1 to 22 of 22

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