-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve find-in-jars.sh, output progress message when interactive mode
- Loading branch information
Showing
1 changed file
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c49aa83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最后一行
done < <(echo "$jar_files")
执行的时候报错:c49aa83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaojunsong 有可能是 比如
bash
的版本不兼容。给一下你的环境信息,就像这样:c49aa83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c49aa83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaojunsong 你的bash已经是4了
确认是最新的实现 https://github.com/oldratlee/useful-scripts/blob/master/find-in-jars
用debug方式运行一下 😄
贴一下运行输出
c49aa83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oldratlee 感谢你的耐心回复!
问题原因找到了,我执行你的脚本用的是sh find-in-jars.sh,刚刚了解了下,/bin/sh和/bin/bash存在一些小的差别,使用/bin/bash可以正常运行了,再次感谢
c49aa83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaojunsong OK,问题解决就好~ 😄
PS:
尽量不要自己指定执行的Shell❗️ 不好的实践。
(这也是我把文件的后缀
sh
去掉的原因,尽量引导以避免有这样习惯的人这样操作。)更多说明如下:
#57 (comment)