已知函数 $f(x)=\left\{\begin{array}{c}x^{2}-1, x \leq 0 \\ -2 x, x>0\end{array}\right.$, 则 $f(2)=$ ; 若 $f\left(x_{0}\right)=8$, 则 $x_{0}=$
(1) $f(2)=-2 \times 2=-4$ ；

（2）当 $x_{0} \leq 0$ 时, $f\left(x_{0}\right)=x_{0}{ }^{2}-1=8 \Rightarrow x_{0}{ }^{2}=9 \Rightarrow x_{0}= \pm 3, \because x_{0} \leq 0, \therefore x_{0}=-3$;

当 $x_{0}>0$ 时, $f\left(x_{0}\right)=-2 x_{0}=8 \Rightarrow x_{0}=-4$; $\because x_{0}>0$, 则 $x_{0}=-4$ 舍去;

综上可知 $x_{0}=3$.