I have a big file that contains several thousands of entries, which are separated by the delimiter "#". What must I write to keep the first, say, 500 entries? I know how to split this file into 1 file per entry with awk for example, but I can't find a way to just keep a number of entries and discard the rest.