dpanagea/Bash-Script
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
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.