The following are two conditions needed for a proof below:
$(i)$ if $x$ and $y$ are in $[a,b]$ and $|x-y|<\delta_{1}$, then $|f(x)-f(y)|<\epsilon$,
$(ii)$ if $x$ and $y$ are in $[b,c]$ and $|x-y|<\delta_{2}$, then $|f(x)-f(y)|<\epsilon$.
LEMMA Let $a<b<c$ and let $f$ be continuous on the interval $[a,c]$. Let $\epsilon > 0$ and suppose that statements $(i)$ and $(ii)$ hold. Then there is a $\delta > 0$ such that,
if $x$ and $y$ are in $[a,c]$ and $|x-y|<\delta$, then $|f(x)-f(y)|<\epsilon$.
If f is continuous on $[a,b]$, then $f$ is uniformly continuous on $[a,b]$.
Proof. It's the usual trick, but we've got to be a little bit careful about the mechanism of the proof. For $\epsilon > 0$ let's say that $f$ is $\epsilon$-good on $[a,b]$ if there is some $\delta > 0$ such that, for all $y$ and $z$ in $[a,b]$,
if $|y-z|<\delta$, then $|f(y)-f(z)|<\epsilon$.
Then we're trying to prove that $f$ is $\epsilon$-good on $[a,b]$ for all $\epsilon > 0$. Consider an particular $\epsilon >0$. Let
$A=\{x:a \le x \le b$, and $f$ is $\epsilon$-good on$[a,x]\}$.
Then $A \ne 0$ (since $a$ is in $A$), and $A$ is bounded above (by $b$), so $A$ has a least upper bound $\alpha$. We really should write $\alpha_{\epsilon}$, since $A$ and $\alpha$ might depend on $\epsilon$. But we won't since we intend to prove that $\alpha=b$, no matter what $\epsilon$ is.
Suppose that we had $\alpha < b$. Since $f$ is continuous at $\alpha$, there is some $\delta_{0}>0$ such that, if $|y-\alpha|<\delta_{0}$, then $|f(y)-f(\alpha)|<\epsilon/2$. Consequently, if $|y-\alpha|< \delta_{0}$ and $|z-\alpha|< \delta_{0}$, then $|f(y)-f(z)|<\epsilon$. So $f$ is surely $\epsilon$-good on the interval $[\alpha - \delta_{0},\alpha+\delta_{0}]$. On the other hand, since $\alpha$ is the least upper bound of $A$, it is also clear that $f$ is $\epsilon$-good on $[a,\alpha-\delta_{0}]$. Then the Lemma implies that $f$ is $\epsilon$-good on $[a,\alpha + \delta_{0}]$, so $\alpha + \delta_{0}$ is in $A$, contradicting the fact that $\alpha$ is an upper bound.
To complete the proof we just have to show that $\alpha =b$ is actually in $A$. The argument for this is practically the same: Since $f$ is continuous at $b$, there is some $\delta_{0}$ such that, if $b-\delta_{0}<y<b$, then $|f(y)-f(b)|<\epsilon/2$. So $f$ is $\epsilon$-good on $[b-\delta_{0},b]$. But $f$ is also $\epsilon$-good on $[a,b-\delta_{0}]$, so the Lemma implies that $f$ is $\epsilon$-good on $[a,b]$.
I wanted to know if someone could provide an example of a function on $[a,b]$ such that $A$ and $\alpha$ depend on $\epsilon$?