Let's assume I have a file as follows (file.txt):
My name is John ||| Second part of example.
To get the first part (till |||)
I did the following:
awk -F '|||' '{print $1}' file.txt
However, this command gives me the whole line.
How can I get the portion of each line until ||| ?