Chmoding a series of files bash script -


i have faced question , looking possible solution(s):

write bash script run command chmod 644 on files /tmp/test28, /tmp/test29 ... /tmp/test48, except /tmp/test32

and may find related exercises? looking resources, if possible please.

you can use seq command. using example above code except /tmp/test32

 x in `seq 28 48`      if [ ${x} -ne 32 ]            touch /tmp/test${x}     fi done  

of course want change touch command chmod command appropriate. didn't have files used touch create them quickly. sort of resources looking for?


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

php - Using str_replace to translate a MySQL Table in html -

asp.net mvc - Cannot display error message on Editor or EditorFor -