I am trying to write a basic bash script where I wish to create some files in my directory and then assign them to variables i.e file to keep as "FILE_KEEP" and file to delete as "FILE_DELETE". How do I assign files to these variables? and How to I remove them using rm command?
touch a.sh b.sh c.sh d.sh e.sh f.sh g.sh
file_keep=(a.sh b.sh c.sh)
file_delete=(d.sh e.sh f.sh)
rm $file_delete