<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Unzip all the genome file and remove all fasta header except first one]]></title>
	<link>https://bioinformaticsonline.com/snippets/view/33328/unzip-all-the-genome-file-and-remove-all-fasta-header-except-first-one?</link>
	<atom:link href="https://bioinformaticsonline.com/snippets/view/33328/unzip-all-the-genome-file-and-remove-all-fasta-header-except-first-one?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/33328/unzip-all-the-genome-file-and-remove-all-fasta-header-except-first-one</guid>
	<pubDate>Tue, 30 May 2017 10:34:25 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/33328/unzip-all-the-genome-file-and-remove-all-fasta-header-except-first-one</link>
	<title><![CDATA[Unzip all the genome file and remove all fasta header except first one]]></title>
	<description><![CDATA[<code>#!/bin/bash

gzip -d *.gz

FILES=$(pwd)/*
for f in $FILES
do
  echo &quot;Processing $f file...&quot;
  	if [[ $f =~ \.fna$ ]];
	then awk &#039; /^&gt;/ &amp;&amp; FNR &gt; 1 {next} {print $0} &#039; $f | sed &#039;/^&gt;/{s/ /_/g}&#039; &gt; $f.fa 
  	#then sed &#039;1!{/^\&gt;/d;}&#039; $f &gt; $f.fa
  	else echo &quot;this file is not right file&quot;
  	fi
  	#cat $f
done</code>]]></description>
	<dc:creator>Jit</dc:creator>
</item>

</channel>
</rss>