if statement - Bash: If line begins with > -


Let me describe a if / then in bash and I can I do not seem to work on it, I would like to say "if line starts with > character, do so and do something else".

I have:

  while IFS = read -r line, if [[$ $ line == "& gt;" Then the $ line echoed the 'first' epho line for 'seconds'  

but this is not working. I also say "avoid" Tried:

  if [[$ $ line == ^ \ & gt; T work either in both ways I get this error:  
  Line 27: [[Blast: Not got the command.  

>

Suggestions?

requires [[and]] inside the blank: / P>

  If [["$ line" == "& gt;" *]]; Then "found" echo resonant "FI  

Comments