Search Results

Search: Posts Made By: sammy777888
3,008
Posted By sammy777888
Create 'n' number random pairwise combination of words
File 1 contains the list of words that needed to be randomly paired:

Tiger
Cat
Fish
Frog
Dog
Mouse
Elephant
Monkey

File 2 contains the pairs that should not be used (in any solution)...
1,680
Posted By sammy777888
sed parser behaving strange on replacing multiple words in multiple files
I have 4000 files like

$cat clus_grp_seq10_g.phy

18 1002
anig_OJJ65951_1 ...
1,750
Posted By sammy777888
Thanks, I am not sure what was the problem as in...
Thanks, I am not sure what was the problem as in my pc there was no any directory creating with the code. So here is what I did

for FN in *.ph*; do TMP=${FN%_${FN#*_*_*_}};...
1,750
Posted By sammy777888
Unfortunately, its not working
Unfortunately, its not working
1,750
Posted By sammy777888
I want mv for for testing I was using cp. Yes the...
I want mv for for testing I was using cp. Yes the number can be multi-digit. So I used loop here.
1,750
Posted By sammy777888
This is what I did for testing but its not...
This is what I did for testing but its not creating multiple directories. If it work then I will add may be two more for loops for .ph_pl_s.t and .ph_pl_tr.t files

#!/bin/bash
if [ "$1" == "-h"...
1,750
Posted By sammy777888
Moving alphanumeric files according to the digit in file name
This is the content of my directory

c_g_se1_gb.ph
c_g_se1_gb.ph_pl_s.t
c_g_se1_gb.ph_pl_tr.t
c_g_se3_gb.ph
c_g_se3_gb.ph_pl_s.t
c_g_se3_gb.ph_pl_tr.t
c_g_se2_gb.ph
c_g_se2_gb.ph_pl_s.t...
2,039
Posted By sammy777888
it gives bash: */150+1: syntax error: operand...
it gives bash: */150+1: syntax error: operand expected (error token is "*/150+1")
2,039
Posted By sammy777888
That worked, but I don't think it i good solution.
That worked, but I don't think it i good solution.
2,039
Posted By sammy777888
I did this after separating the three types of...
I did this after separating the three types of files in three folders
i=0;
for f in *;
do
d=dir_$(printf %03d $((i/150+1)));
mkdir -p $d;
mv "$f" $d;
let i++;
doneThen...
2,039
Posted By sammy777888
Splitting a folder containing different files into subfolders
I have a folder with 4000 (*3) files like
gr_q4_gb-1.anc
gr_q4_gb-1.anc_cdr_st.txt
gr_q4_gb-1.anc_cdr_tr.txt
gr_q4_gb-2.anc
gr_q4_gb-2.anc_cdr_st.txt
gr_q4_gb-2.anc_cdr_tr.txt...
1,576
Posted By sammy777888
Sort two columns with alphanumeric values horizontally
Hi, I have a file like
aa bb dmns|860 dmns|756 ee ff
aa bb dmns|310 dmns|260 ee ff
aa bb dmns|110 dmns|77 ee ff
aa bb dmns|756 dmns|860 ee ff
aa bb dmns|110 dmns|77 ee ff...
1,443
Posted By sammy777888
Thanks the Error is gone. Here is what I did: ...
Thanks the Error is gone. Here is what I did:
awk -v old_min=$old_min -v old_max=$old_max '{ print $0, (($10 - old_min)/(old_max - old_min)) * ((1 - 0.25) + 0.25)}' temp11
1,443
Posted By sammy777888
Division by zero attempted error during linear conversion of values between 0.25 to 1
I want to implement the below formula with awk oneliner
new_value = ((old_value - old_min) / (old_max - old_min) ) * (new_max - new_min) + new_min

I want to pass the value of old_min and old_min...
3,297
Posted By sammy777888
Excel vlookup function like value mapping with awk
I have two files

File1
175552 st_497858.1 rs86052.1 rs92185.1 st_001022416.1 174841 175552_174841
179912 st_001122967.2 rs90435.1 rs89122.1 st_001022583.1 175545 179912_175545
179912...
1,413
Posted By sammy777888
Mapping the values of ids of two columns of file1 from file2
I have of two space separated files:

==> File1 <==
PT|np_496075.1 st|K92748.1 st|K89648.1 PT|np_001300561.1
PT|np_497284.1 st|K90752.1 st|K90279.1 PT|np_740775.1
PT|np_497749.1 st|K90752.1...
1,180
Posted By sammy777888
How to assign correct values to the multiple words?
The file1 contains mistakes and looks like

1 No one have never become rich by giving.
Anne Dickens
2 No one is worthless in this globe who lightens the weights of other.
Charles_Dickens
...
3,659
Posted By sammy777888
the text are the big files of protein sequences...
the text are the big files of protein sequences like

>AB733
------MDRGCRKENVAVDKRVREAGLRPTRQRIALADLLFAKGDRHLSAEELHEEAQAA
GVPVSL
>AB734...
3,659
Posted By sammy777888
How to replace multiple words together?
I am looking for any smart perl solution for multiple word replacement together. My awk is working but for big files it is superslow.

awk 'NR==FNR {a[$1]=$2;next} {for ( i in a) gsub(i,a[i])}1'...
Showing results 1 to 19 of 19

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