-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme
More file actions
9 lines (8 loc) · 670 Bytes
/
readme
File metadata and controls
9 lines (8 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
PROJECT 2 - System's Programming
Bashscript runs like this: ./create_infiles.sh inputFile input_dir numFilesPerDirectory
-Firstly it checks if the number given is correct.
-It creates a folder with name input_dir. If the folder already exists, then it prints an error message and it exits.
-For every different country found in inputFile, it creates a subdirectory in input_dir, with the country's name.
- In each subdirectory it creates n files (n = numFilesPerDirectory), in the format of 'country-n.txt'.
-While reading inputFile, it will locate all the lines that refer to the certain country, and will copy them to the aforementioned files,
using round-robin.