You should be able to get it from this thread. Only thing is to change the separator and take only what you need:
def lines = new File('data.txt').readLines()
lines.eachWithIndex { line, index ->
if (index) {
def data = line.split('\\|')*.trim()
log.info data[0]
}
}