RS - Records Separator in UNIX

RS - awk built in variable used to specify record separator in AWK. This is helpful if your file contains lines, and when they are not separated by new line character.

Example : Apply RS in ; (semi-colon separated) file,

cat file.txt
sam 80;merlin 90;Alan;ray 85;

awk 'BEGIN{RS=";"}{print $0;}' file.txt


sam 80
merlin 90
ray 85