Difference between the commands

HI all,

Please clarify the difference between the following

pm2srv:/var/opt/temip/vf/scripts/saiki#awk '{RS = ":"} ; {print $0}' testf2
hey:wasup:howru:
Yes
I
am
fine


pm2srv:/var/opt/temip/vf/scripts/saiki#awk 'BEGIN { RS = ":" } ; { print $0 }' testf2
hey
wasup
howru

Yes
I
am
fine

pm2srv:/var/opt/temip/vf/scripts/saiki#awk 'RS = ":" { print $0 }' testf2
hey:wasup:howru:
Yes
I
am
fine

When i am using record separator with BEGIN, then only it is splitting the record and printing. Please clarify this.

Thanks
saiki

---------- Post updated at 12:25 PM ---------- Previous update was at 12:19 PM ----------

Ok , I got the solution guys.

awk's RS has to be initiated with the BEGIN before reading files.

Thanks
saiki