I am not sure I understood correctly but here is at least something to help.
Use a combination of find and xargs to manipulate lists of files.
find -maxdepth 1 -regex './[0-9]*' -print0 | xargs -0 -I'{}' mv "{}" "newdir/{}"
Using -print0
and -0
and quoting the replacement symbol {}
make your script more robust. It will handle most situations where non-printable chars are presents. This basically says it passes the lines using a
char delimiter instead of a
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…