A 24-year-old man who launched an "unprovoked and vicious" attack on another man was handed a two-year sentence today.