有没有办法在猪脚本中使用这样的语法?
命令:
/* some pig latin code here */
mv /user/test/folder_pattern* /path/to/move
/* some pig latin code here */
错误:
[main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2997: Encountered IOException. File or directory /user/test/folder_pattern* does not exist.
当我指向带有'*'的文件夹的完整路径时,它可以正常工作。 我怎么能像hdfs fs或bash一样通过模式mv,cp,rm文件?
答案 0 :(得分:0)
你可以试试' sh'从grunt shell和pig脚本运行shell命令。
语法: - sh子命令subcommand_parameters
对于您提供的代码,它看起来像这样 -
LevelSelection ls
希望这有帮助!!!