Running Locally
#pig -x local average_dividend.pig
Runnig on Hadoop Cluster
#pig -e fs -mkdir /user/username //username is the name who run pig
#pig -e fs -copyFromLocal NYSE_dividends NYSE_dividends //put test data to /user/username dir
#pig average_dividend.pig
#pig -e cat average_dividend // print the result
Command-Line and Configuration Options
-e or -execute
Execute a single command in Pig. For example, pig -e fs -ls will list your home directory.
-h or -help
List the available command-line options.
-h properties
List the properties that Pig will use if they are set by the user.
-P or -propertyFile
Specify a property file that Pig should read.
-version
Print the version of Pig.
Return Codes