forked from mit-ll/em-processing-opensky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRUN_2_rmOrganized.sh
42 lines (33 loc) · 900 Bytes
/
RUN_2_rmOrganized.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Copyright 2018 - 2020, MIT Lincoln Laboratory
# SPDX-License-Identifier: BSD-2-Clause
# cleanupSubmitted.sh
#
# $1 : name of file containing list of directories to delete
# Directory for output of oranizeraw_1()
if [ -z "$1" ]; then
inDir=$AEM_DIR_OPENSKY/output/1_organize
else
inDir=$1
fi
if [ -z "$2" ]; then
suffix="csv"
else
suffix=$2
fi
outName=$AEM_DIR_OPENSKY/output/files_$suffix$(echo "$inDir" | sed 's/\//_/g').txt
echo "Output file: $outName"
find "$(cd $inDir ; pwd)" -name *$suffix > $outName
### LLSC
nproc=512
mapper="rmFile.sh"
dirListName=$outName
currDir=`pwd`
echo "LLMapReduce --input=$dirListName --output=$currDir
--mapper=$mapper --np=$nproc --keep true"
## Submit a job to the Grid to remove the directories in the file
LLMapReduce --input=$dirListName \
--output=$currDir \
--mapper=$mapper \
--np=$nproc \
--keep true