A MACHETE-wielding thug who tried to rob a grocery store has been jailed for four years.

James Cook struck owner Shafquat Zia during a struggle at the shop in Paisley in May 2007.

Cook fled but was later snared when items - including a balaclava and a Job Centre application in his name - were found nearby.

The 32 year-old admitted to the raid when he appeared at the High Court in Glasgow.

It emerged Cook had been sentenced to 15 years in 1996 for attempted murder after leaving a man crippled.

Judge Lord Brailsford told him the term for this latest offence would have been six years, but for his guilty plea.

Masked Cook had entered the shop in Barterholm Road, Paisley, at around 2pm last May 20 and leapt over the serving area.

Owner Mr Zia grabbed a golf club he kept hidden and hit Cook.

The attack was captured on CCTV from within the store and showed the sequence of events as the accused lashed out with his machete striking the man once, but Mr Zia still managed to pull off his balaclava.

Cook dropped the weapon before racing out of the shop.

Police were called and officers found clothes that Cook had been wearing in a nearby street.

They also discovered a Job Centre letter in his name in a pocket.

DNA from the balaclava and a pair of gloves matched Cook's.

The court heard Mr Zia has since sold the shop although it is not known if it was due to the raid.

Louise Arrol, defending, said Cook had committed the offence to obtain funds for a drug habit.

Lord Brailsford told Cook: "You have a record involving violence.

"There is no alternative but a significant custodial sentence."