I have a file contain multiple gene >sequences. I want to separate into a file with gene ID perl or python script 
As others have mentioned this is answered a lot on the forum. But I can't help myself when it comes to trying to make `bash` do this sort of thing (sequences will have to be linearised).

    #!/bin/bash
    
    i=1;
    while read line ; do
      if [ ${line:0:1} == ">" ] ; then
        echo "$line" >> seq"${i}".fasta
      else
        echo "$line" >> seq"${i}".fasta
        ((i++))
      fi
    done < $1

Usage:

    $ bash splitfasta.sh multifasta.fasta

Disclaimer:

You should always use a proper parser though (like biopython) as it'll catch many of the special cases. My code just has the bonus of not requiring anything to be installed to run.