Hello Folks,
I am a newbie to the Linux.
I have been trying to write a bash script for the task below,
1, create a directory under your home folder which will create 10 temp files in the series
(files1, files2, files3 .. )
2, add Extension ".new" to all the files in a directory.
3, print the last updated file
4, change the last updated file permission to 600
Code I wrote
#!bin/bash
for i in {1..10}
do
mktemp --suffix=.new file$i.XXX
Done
Does anyone know what more codes to be added inorder include point 3 and 4 ?
I am a newbie to the Linux.
I have been trying to write a bash script for the task below,
1, create a directory under your home folder which will create 10 temp files in the series
(files1, files2, files3 .. )
2, add Extension ".new" to all the files in a directory.
3, print the last updated file
4, change the last updated file permission to 600
Code I wrote
#!bin/bash
for i in {1..10}
do
mktemp --suffix=.new file$i.XXX
Done
Does anyone know what more codes to be added inorder include point 3 and 4 ?