Convert in the Play Shell

xiaoxiao2021-03-06  69

#! / bin / sh

For f in * do mv $ f `Echo $ f | TR" [: Upper:] "[: Lower:]" `DONE -------------------------------------------------------------------------------------------------------------------------- -------------------------------------- [: Upper:] [A - Z] [: Lower:] [A - Z] [: DIGIT:] [0 - 9] [: alnum:] [0 - 9 a - z az] [: space:] space or tab key [: alpha:] [A - Z A - z] ---------------------------------------------- ------------ Change all lowercase file names in the current directory to uppercase file names. LS | awk '{printf ("MV% S% S / N", $ 0, TouPper ($ 0)) | "SH"}' changes all uppercase file names in the current directory to lowercase file names. LS | awk '{Printf ("MV% S% S / N", $ 0, TOLOWER ($ 0)) | "sh"}'

转载请注明原文地址:https://www.9cbs.com/read-90705.html

New Post(0)