Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在我的情况是这样的。我在窗口中使用eclipse创建了一个war文件。现在我想将我的 war 文件与我的 bash 脚本一起压缩,以便自动安装。无论如何,我的bash脚本可以自动识别我的war文件吗?
您可以轻松使用该zip命令。有关man zip更多详细信息,请参阅。
zip
man zip
如果要在同一目录中归档多个 war 文件:
lstPath="" for warFile in "$DIR"/*.zip; do lstPath="$lstPath $warFile" done zip a.zip lstPath
或者 :
lstPath="" for warFile in "$DIR"/*.zip; do zip a.zip "$warFile" done
如果战争文件不在同一个目录中,您可以使用find命令;)
find