Hello All,
I have a small problem, i would like to solve with bash scripting.(sed grep anything..).
I have a file and i want to search for the start of the file..if the pattern is not present and then to delete those lines..
forexample:
---------
>SEQ216
------------------------------------------------------------
------------------------------------------------------------
--------------------GLIHGGT--KAAPLNEGA----------------------
------------------------------------------------------------
---------------------------------------------------YELNQCASI
---------
>SEQ250
------------------------------------------------------------
------------------------------------------------------------
--------------------GTIYGFN--VMGVVCLYG----------------------
------------------------------------------------------------
---------------------------------------------------FEHDLCDAV
---------
>SEQ251
------------------------------------------------------------
------------------------------------------------------------
--------------------GVMKGAN--TMGVVCLYG----------------------
------------------------------------------------------------
---------------------------------------------------FKHDLCDAI
---------
>SEQ252
------------------------------------------------------------
------------------------------------------------------------
--------------------GVVSGGH--TMGVVCLYG----------------------
------------------------------------------------------------
---------------------------------------------------YEIERCDEI
---------
$$$$$$$$$$$$$$$$$$$$$
I would like that the first element in the file is a '>'..If this is not the case , then delete this line....
Any help would be highly appreciable.
Thanks in advance..