use the For loop to bulk create 10 HTML files in the/oldboy directory, where each file needs to contain 10 random lowercase characters plus a fixed string oldboy, with the following name examples:
[[email protected]]# ls/oldboy
apquvdpqbk_oldboy.html mpyogpsmwj_oldboy.html txynzwofgg_oldboy.html
bmqiwhfpgv_oldboy.html mtrzobsprf_oldboy.html vjxmlflawa_oldboy.html
Jhjdcjnjxc_oldboy.html qeztkkmewn_oldboy.html
Jpvirsnjld_oldboy.html ruscyxwxai_oldboy.html
(1) Answer:uuidgen|tr ' 0-9-' A-Z ' |cut-c -10 <== The 10-bit random character assigned value to the variable.
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/95/AA/wKiom1kYTAfAEY7jAAAwICQZtPE090.png "title=" 46. PNG "alt=" Wkiom1kytafaey7jaaawicqztpe090.png "/>
(2) Execution results
[Email protected] scripts]# ls/oldboy/
apquvdpqbk_oldboy.html mpyogpsmwj_oldboy.html txynzwofgg_oldboy.html
bmqiwhfpgv_oldboy.html mtrzobsprf_oldboy.html vjxmlflawa_oldboy.html
Jhjdcjnjxc_oldboy.html qeztkkmewn_oldboy.html
This article is from the "Serve the" blog, please be sure to keep this source http://junhun.blog.51cto.com/12852949/1925612
Enterprise Shell face question 1: Batch generate random character file name case