Newcastle Crown Court has heard how a man attacked two men with a bottle and stabbed one of them in the neck with the broken shards leaving him "inches away from death".