Search Results

Search: Posts Made By: cmccabe
13,639
Posted By cmccabe
Thank you for all your help, works perfect :).
Thank you for all your help, works perfect :).
13,639
Posted By cmccabe
Here is the output as well a fourth and a...
Here is the output as well a fourth and a commented code that I hope is close to correct and makes sense. Thank you :).

Is each line in uniq being stored in the split d=split($0, val, " ");

...
13,639
Posted By cmccabe
Here is the output, is the mv without the echo...
Here is the output, is the mv without the echo still using the missing file? Thank you very much :).

echo mv

Rename from:IonCode_0404 to:00-0000-xxx-xxx-xxx IonCode_0402 11-1111-yy-yy-yyy
mv...
13,639
Posted By cmccabe
Hmm, i am using ubuntu and centos. Thank you :).
Hmm, i am using ubuntu and centos. Thank you :).
13,639
Posted By cmccabe
I pass run_dir as an argument instead of...
I pass run_dir as an argument instead of hardcoding dir. I think that is the only difference. I made that change to make it easier for others. Thank you :)


run_dir=$1
for run in "$run_dir" ; do...
13,639
Posted By cmccabe
Here is the output ofod -c /path/to/f1. Thank...
Here is the output ofod -c /path/to/f1. Thank you :).


0000000 I o n C o d e _ 0 4 0 4 0 0 -
0000020 0 0 0 0 - x x x - x x x - x ...
13,639
Posted By cmccabe
Here is the output, yes I am using bash shell....
Here is the output, yes I am using bash shell. Thank you :).


with echo
Rename from: to:
mv IonCode_0402_xxx.xxx_xxx.bam _test.bam
mv IonCode_0402_xxx.xxx_xxx.bam.bai _test.bam.bai
mv...
13,639
Posted By cmccabe
Here is what I get: with echo mv mv...
Here is what I get:


with echo mv

mv IonCode_0402_xxx.xxx_xxx.bam _test.bam
mv IonCode_0402_xxx.xxx_xxx.bam.bai _test.bam.bai
mv IonCode_0404_xxx.xxx_xxx.bam _test.bam
mv...
13,639
Posted By cmccabe
After the rename scripts runs then only one pair...
After the rename scripts runs then only one pair of the files is renamed with both values in it, with a space in between. This is shown in the above, but im not sure why. Your output looks good....
13,639
Posted By cmccabe
I put an echo "These are the files:" $file...
I put an echo "These are the files:" $file statement and the files in data before the script executes are:

These are the files: IonCode_0402_xxx.xxx_xxx.bam
These are the files:...
13,639
Posted By cmccabe
My apologies, I have corected the typo in post 1...
My apologies, I have corected the typo in post 1 and here as well. All 3 uniq values in f1 will always be different I just transcribed them wrong. Line 3 (the duplicate) will never be there...
13,639
Posted By cmccabe
I'm not sure I understand completly but in f1 the...
I'm not sure I understand completly but in f1 the same IonCode may appear multiple times. However, the value in uniq is always unique and the each IonCode above each uniq unill the newline in f1 will...
13,639
Posted By cmccabe
Looks like only one pair gets renamed with both...
Looks like only one pair gets renamed with both values: Thank you :).


4 original files:

IonCode_0402_xxx.xxx_xxx.bam
IonCode_0402_xxx.xxx_xxx.bam.bai
IonCode_0404_xxx.xxx_xxx.bam...
13,639
Posted By cmccabe
Looks like the last file in the directory is...
Looks like the last file in the directory is getting renamed with both matching not the unique. Is another loop needed or all the values on one line instead of separate? Thank you :).



mv...
13,639
Posted By cmccabe
Rename file using partial match to another
In the below I am trying to rename the contents within each data subfolder in a specific run, based on a partial match of the IonCode_0000_ in each file in the data subdirectory to $1 in f1. There...
Showing results 1 to 15 of 15

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