本文介绍了grep:-P在Jenkins中仅支持单字节和UTF-8语言环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个Shell脚本,该脚本在本地的git bash中正确执行.但是,如果通过Jenkins使用与外壳程序环境相同的git bash执行相同的操作,则会失败,并显示"grep:-P仅支持unibyte和UTF-8语言环境".
I have a shell script that is executing correctly in git bash in my local. However, when the same has been executed via Jenkins with the same git bash as the shell environment, it is failing with "grep: -P supports only unibyte and UTF-8 locales".
我的本地环境在Windows上,詹金斯也在Windows上.
My local environment is on Windows and Jenkins too is on windows.
有人可以解释吗?
推荐答案
这应该有效:
LC_ALL=en_US.utf8 grep ...
这篇关于grep:-P在Jenkins中仅支持单字节和UTF-8语言环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!