Also, both commands promote Pig script modularity as they allow you to reuse existing components. ![]() Both the exec and run commands are useful for debugging because you can modify a Pig script in an editor and then rerun the script in the Grunt shell without leaving the shell. Exec without any parameters can be used in scripts to force execution up to the point in the script where the exec occurs.įor comparison, see the run command. Unlike the run command, exec does not change the command history or remembers the handles used inside the script. With the exec command, store statements will not trigger execution rather, the entire script is parsed before execution starts. Aliases defined via the shell are not available to the script. Aliases defined in the script are not available to the shell however, the files produced as the output of the script and stored on the system are visible after the script is run. Use the exec command to run a Pig script with no interaction between the script and the Grunt shell (batch mode). In this example the clear command clean up Pig grunt shell.Įxec In this example the ls command is invoked.Ĭlear the screen of Pig grunt shell and position the cursor at top of the screen. Commands such as cd are not programsīut part of the shell environment and as such cannot be executed unless the user invokes the shell explicitly, like "bash cd". Note that only real programs can be run form the sh command. Use the sh command to invoke any sh shell command from within a Pig script or Grunt shell. Invokes any sh shell command from within a Pig script or the Grunt shell. In these examples a directory is created, a file is copied, a file is listed. ![]() ![]() Supported for existing commands such as ls that will now support globing. The fs command greatly extends the set of supported file system commands and the capabilities Use the fs command to invoke any FsShell command from within a Pig script or Grunt shell. Invokes any FsShell command from within a Pig script or the Grunt shell.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |