일부 파일을 반복하고 이름 변경과 관련된 몇 가지 작업을 수행하는 bash 스크립트를 만드는 방법 :
components / *를 제외한 모든 하위 디렉토리에서 모든 index.html 파일을 찾고 다음과 같이 각 파일을 처리합니다.
mv dir1/index.html dir1/index_dev.html
vulcanize -o dir1/index.html dir1/index_dev.html
mv dir2/index.html dir2/index_dev.html
vulcanize -o dir2/index.html dir2/index_dev.html
...
감사
다음을 가질 수 있습니다.
for FILE in */index.html; do
[[ $FILE == components/index.html ]] && continue ## Skip.
mv "$FILE" "${FILE%.html}"_dev.html
done
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다