FunctionRacerProblemsRace

Sort Into Folders

HardBasha shell script

Move every file in this folder into a folder named after its ending: a.txt goes to txt/a.txt, pic.png to png/pic.png. Make the folders that are needed. Some names have spaces.

Example 1

a.txt
1
b.txt
2
pic.png
3
ends as
== ./png/pic.png
3
== ./txt/a.txt
1
== ./txt/b.txt
2

Constraints

Race itor take your time

Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.

More Bash problems