The basis of Shell and string operation
This article mainly explains "the foundation of Shell and string operation". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the idea of Xiaobian to study and learn "the foundation of Shell and string operation" together.
Shell Foundation: www.runoob.com/linux/linux-shell.html
Shell find command: justcoding.iteye.com/blog/1948003
Shell string operation: www.cnblogs.com/gaochsh/p/6901809.html
#!/ usr/bin/bashfind /c/Users/Administrator/Desktop/apache-tomcat-8.5.40/webapps/* -maxdepth 0 -name "panda-*" | xargs rm -rf#!/ usr/bin/bashrmTargetDir="/c/Users/Administrator/Desktop/war/*"originDir="/d/WORKSPACE/intelljIdea/dinganhua/pzh3/code-pzh3/panda-*/target/*"targetDir="/c/Users/Administrator/Desktop/war"rm -rf $rmTargetDirfind $originDir -maxdepth 0 -name "panda-*.war" | xargs -i cp {} $targetDirfor filename in $(find $rmTargetDir -maxdepth 0 -name "panda-*.war")do newfilename=${filename/-0.0.1-SNAPSHOT/} mv $filename $newfilenamedone Thank you for reading, the above is the "Shell foundation and string operation" content, after the study of this article, I believe we have a deeper understanding of the Shell foundation and string operation, the specific use of the situation also needs to be verified. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!