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

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -