Please create a file with your input in it. Here I have create a file named in.txt that contains

Now start your grunt shell by firing pig -x local ( I’m running in local mode) and fire commands as shown in below screen shot:

Below is the output:

Hope this resolves your query