- Create 50 files whose names are from
1to50.- Create five folders (
0,10,20,30,40).- Copy those 50 files into folders based on their name (for example, file
21will go to folder20).
I have created those files and folders, but have no idea how to move a specific file to specific folder. I tried writing
cp {1..9} /home/user/folder
but that's not acceptable. Is it possible to do using if and elif?
forloop itc - but you can do without of course, but no need forifandelifas i see itfor i in {1..50}- see my answer below