Search Results

Search: Posts Made By: genehunter
4,321
Posted By genehunter
Thank you for the mv solution. Can you help...
Thank you for the mv solution.
Can you help doing this using rename function.
the version I have is rename from util-linux 2.23.2, which uses substring match.
Thanks
4,321
Posted By genehunter
Yes, sorry.. that was sloppy copy pasting. ...
Yes, sorry.. that was sloppy copy pasting.
Edited to correct it
4,321
Posted By genehunter
UNIX rename with Regex to remove middle string from file names
Filenames look like this:
CMRLPCR000020_S235_M.bum
CMRLPCR000021_S238_M.bum
CMRLPCR000022_S2341_M.bumI want to change it to :

CMRLPCR000020_M.bum
CMRLPCR000021_M.bum
CMRLPCR000022_M.bum
I...
Forum: Programming 09-19-2018
2,770
Posted By genehunter
Thank you!
Thank you!
Forum: Programming 09-19-2018
2,770
Posted By genehunter
Yes, that worked perfectly. Thank you! So, let...
Yes, that worked perfectly. Thank you!
So, let me understand your approach.
First, you are looking for Non-empty cells, and then making a count of such cells?
($N!="") CNT[N]++
Then you are...
Forum: Programming 09-19-2018
2,770
Posted By genehunter
awk -F "\t" '{ for(N=1; N<=NF; N++) if($N=="");...
awk -F "\t" '{ for(N=1; N<=NF; N++) if($N==""); {print NF}}' ex.txt
This gives me NF=14, but I want the each col. in the file as header and another line with the number of non-empty lines for each....
Forum: Programming 09-19-2018
2,770
Posted By genehunter
Count columns that are non-empty per line
The file is similar to the attached.
Thousands of columns, delimiter is tab, with many columns containing free text and space separated.
I want to get the count of columns with non-empty entries.
...
1,809
Posted By genehunter
Can you please explain the code. Does $1=$1...
Can you please explain the code.
Does $1=$1 help cleaning up the first column or print the first line?
Would be very useful to understand the usage and learn awk if you can write a few words of...
1,809
Posted By genehunter
Match Columns in one file and extract columns from another file
Kindly help merging information from two files with the following data structure.
I want to match for the CHR-SNP in Foo and get the columns that match from CHROM-rsID
Fields 1 & 2 of foo may have...
1,279
Posted By genehunter
Autojump with modified bash prompt
I use the .bashrc file from this thread. (http://www.linuxquestions.org/questions/linux-general-1/ultimate-prompt-and-bashrc-file-4175518169/)
Direct link to the archive containing the ultimate...
2,390
Posted By genehunter
Wont that shift the fields when adding an...
Wont that shift the fields when adding an additional tab in between?
Will it work if I put an underscore or do I need to breakup that field?
Thanks for your help
2,390
Posted By genehunter
it did not work correctly. It changed a bunch...
it did not work correctly.
It changed a bunch of columns with ./. to ./-999
Same with the perl solution.
I guess, my example did not have fields with "./."
2,390
Posted By genehunter
Replace period in a tab delimited file to a number
I have a file like this.
It is tab delimited.
Unfortunately, the missing data was filled in with a period "." (see the leading lines 1-5 columns)
I want to substitute the periods for misisng data...
3,128
Posted By genehunter
I added the aliases, and yes, I do have COLOR.
I added the aliases, and yes, I do have COLOR.
3,128
Posted By genehunter
UNIX Special Characters
Any time I do :
ls *.txt > mytext.txt
I get something like this in the output file:

^[[0;32mCGRI0007.txt^[[0m*
^[[0;32mCGRI0008.txt^[[0m*
^[[0;32mCGRI0009.txt^[[0m*
^[[0;32mCGRI000.txt^[[0m*...
7,119
Posted By genehunter
The awk command worked fine.. For some reason...
The awk command worked fine..
For some reason neither comm or diff -a --suppress-common-lines worked for me.. not sure why.
7,119
Posted By genehunter
File Comparison: Print Lines not present in another file
Hi,
I have fileA.txt like this.

B01B02 D0011718
B01B03 D0012540
B01B04 D0006145
B01B05 D0004815
B01B06 D0012069
B01B07 D0004064
B01B08 D0011988
B01B09 D0012071
B01B10 D0005596...
1,901
Posted By genehunter
Both the scripts worked very well Thank you. Is...
Both the scripts worked very well Thank you.
Is it possible to have the filenames as 1st rows in the results file.
Thanks
!GH
1,901
Posted By genehunter
Combine columns from 100 files with same structure
Hi,
I have a bunch of files with the following format.

PUR.1.9
30910 0.024 0.926 0.050
36587 0.024 0.927 0.049
91857 0.023 0.928 0.049
105797 0.024 0.927 0.049
146659 0.024 0.927 0.049...
2,403
Posted By genehunter
Merging columns based on one or more column in two files
I have two files.
FileA.txt
30910 rs7468327
36587 rs10814410
91857 rs9408752
105797 rs1133715
146659 rs2262038
152695 rs2810979
181843 rs3008128
182129 rs3008131
192118 ...
1,664
Posted By genehunter
Exit status as zero byte files
Hi,
In a list of commands executed in a script, how do you make sure that the previous command worked fine?
I have a list of awk commands and I want to make sure that the script aborts if any...
9,300
Posted By genehunter
I just gave an exmple of a single file . The...
I just gave an exmple of a single file .
The {1} can be substituted by any number of variables that act as prefixes for FileA

parallel - build and execute shell command lines from standard input...
9,300
Posted By genehunter
Gnu parallel and awk syntax quotes
I have many files that has the following structure.

CHR SNP BP A1 TEST NMISS OR SE L95 U95 STAT P
1 rs2980319 ...
1,980
Posted By genehunter
How to get directories colored when doing change directory and tab
I am trying to navigate between directories using cd.
However, the only way to distinguish directories now is by seeing the "/' after the directory names, which is quite inefficient. How can I make...
6,054
Posted By genehunter
Sorry but few adding question : Which foo...
Sorry but few adding question :

Which foo entry does NOT need to be displayed :

1. Any foo entry that has his rs# NOT in bar ?
Unsure, Very unlikely. How to test this?

2. Any foo entry that...
Showing results 1 to 25 of 87

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