A Palestinian stabbed and lightly injured a civilian in Jerusalem on Friday before being shot and severely wounded, police said, in the first knife attack in the city for two weeks.