Search Results

Search: Posts Made By: PerlNutt
2
1,694
Posted By rangarasan
perl
Hi,

Try this one,


#! /usr/bin/perl

my $file = "path/inputfile";
my $outfile = "path/outfile";

if( open(IFILE, "<", "$file") )
{
if ( open(OFILE, ">", "$outfile") )
{
...
2,913
Posted By balajesuri
$ perl -ane...
$ perl -ane 'if(/^>/../\*$/){if(/^>/){$F[0]=~s/^>//;$f=$F[0]}open O,">>${f}.txt";print O $_;close I}' genomes.txt


Based on your input in post #3, this above one-liner will give you three txt...
2,913
Posted By CarloM
Will awk do? awk 'BEGIN {RS=">"} FNR>1 {print >...
Will awk do?
awk 'BEGIN {RS=">"} FNR>1 {print > "file"NR-1".txt"}' gen.txt
Showing results 1 to 3 of 3

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