Search Results

Search: Posts Made By: ivpz
1,571
Posted By ivpz
Thanks for the help. sprintf, should spend a bit...
Thanks for the help. sprintf, should spend a bit of time learning this.
1,571
Posted By ivpz
Format width of a single column
I have a tab delimited table with more than 126 columns. One of the columns however contains more than 90 characters and this makes the table really difficult to read. I know I can use awk and printf...
2,861
Posted By ivpz
Thank you all for your help.
Thank you all for your help.
2,861
Posted By ivpz
This is doing the trick but any idea why my...
This is doing the trick but any idea why my command doesn't work? And can you please explain your command? Thank you.
2,861
Posted By ivpz
Input: ...
Input:

@MVM-RI-I124161:36:000000000-A326L:1:1101:14597:1343 1:N:0:NTTACTCG...
2,861
Posted By ivpz
Reverse even lines
I'm trying to reverse every even line in my file using the awk command below but it prints only the odd lines but nothing else:

$ awk '(NR % 2) {print}; !(NR % 2) {print | "rev";}' myfile

Any...
6,511
Posted By ivpz
This solves my problem. Thank you. By the...
This solves my problem. Thank you.

By the way can you explain the single quotation '$f'? I have tried with double quotation and it simply replaced the line with "$f". And why the curvy bracket at...
6,511
Posted By ivpz
sed to replace pattern with filename
Hi all,

I'm trying to replace a pattern/string in about 100 files with the filename using following commands but getting nowhere:

for f in *.fa; do sed "s/^>.*/>$f/g" $f > $f_v1.fa; done
...
8,282
Posted By ivpz
This is working for me. Thank you all for your...
This is working for me. Thank you all for your help.
8,282
Posted By ivpz
For example, the following are the term in my...
For example, the following are the term in my list file:

LR30F04
LW36F03
PI21M21

And I'll like to grep all lines containing LR30F04 into file1.txt, LW36F03 into file2.txt, etc...

Thank...
8,282
Posted By ivpz
Grep multiple terms and output to individual files
Hi all,

I'll like to search a list of tems in a huge file and then output each of the terms to individual files. I know I can use grep -f list main.file to search them but how can I split the...
13,682
Posted By ivpz
The back slash!! :p I actually tired FS=""," but...
The back slash!! :p I actually tired FS=""," but didn't work. Now it is working. Thanks a lot.
13,682
Posted By ivpz
Because the number of additional info, hence the...
Because the number of additional info, hence the number of commas, vary from line to line and there are well over 40k lines
13,682
Posted By ivpz
double quote as the delimiter
I'm trying to extract a column from a csv file with either cut or awk but some of the fields contain comma with them:

"Field1","Field2, additional info","Field3",...,"Field17",...

If I want to...
6,430
Posted By ivpz
Hi Tange, Thanks for the clarification. I've...
Hi Tange,

Thanks for the clarification. I've been "playing" around with it the last few days and just glad to see the improved speed.
6,430
Posted By ivpz
I solved the problem with this: for f in...
I solved the problem with this:

for f in *.rod; do echo $f; cut -f5 $f | sort -k1.3n | uniq | wc -l; done

---------- Post updated at 02:36 PM ---------- Previous update was at 02:17 PM...
6,430
Posted By ivpz
piping problem with xargs
I'm trying to pipe the output from a command into another using xargs but is not getting what I want. Running this commands:

find . -name '33_cr*.rod' | xargs -n1 -t -i cut -f5 {} | sort -k1.3n |...
1,929
Posted By ivpz
Sorry for asking something which may be obvious...
Sorry for asking something which may be obvious but what do %s and %16s mean?
Thank you.
1,929
Posted By ivpz
formatting tab with even size
I have a number of columns separated by tabs but the spacing between them are of different sizes. Is there any way of separating them with tab of even size?

Thank you.
2,471
Posted By ivpz
thanks for you.
thanks for you.
2,471
Posted By ivpz
How to select and edit on a particular column?
How can I use awk to pick a particular column and work on it? For example, I want to count the number of characters in column10 that are separated by |?

Thank you.
6,115
Posted By ivpz
Hi Alister, Thanks for the modified script....
Hi Alister,

Thanks for the modified script. The errors are not corrected but some of the lines got deleted. When I ran it on my data of about 4.5million lines, nearly 3000 got deleted. However, I...
6,115
Posted By ivpz
Hi Alister, I don't think any of those...
Hi Alister,

I don't think any of those characters cause the error. Many of the lines have them too and the the output results are ok. When I took out those lines with incorrect output and reran...
6,115
Posted By ivpz
Sorry, my mistake. Yes, it should be column 6. ...
Sorry, my mistake. Yes, it should be column 6.




Each Uppercase A should be compared with the lowercase a only; in essence:

compare col2 and col6; if col2>col6, add + else - to a new col....
6,115
Posted By ivpz
No. There is only one A, i.e. 1 in column 2 and 0...
No. There is only one A, i.e. 1 in column 2 and 0 in column 5.

The order of comparison should be A followed by C followed by G and finally by T. If A is found in the first line, it should not be...
Showing results 1 to 25 of 28

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