-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from betarixm/feat/script
feat: add script for gensort
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# Number of data directories (M) and files in each directory (N) | ||
numberOfDirectories=2 | ||
numberOfFiles=2 | ||
numberOfRecords=4000 | ||
|
||
# Base directory | ||
baseDir="/home/green/434project" | ||
|
||
# Step 2: Remove files in each data directory and in the output directory | ||
for (( dir=0; dir<numberOfDirectories; dir++ )); do | ||
rm -rf "${baseDir}/data${dir}"/* | ||
done | ||
|
||
# Removing files in the output directory | ||
rm -rf "${baseDir}/output"/* | ||
|
||
# Step 3: Run the command for each file in each data directory | ||
for (( dir=0; dir<numberOfDirectories; dir++ )); do | ||
for (( file=0; file<numberOfFiles; file++ )); do | ||
../64/gensort -a -s $numberOfRecords "${baseDir}/data${dir}/${file}" | ||
done | ||
done |