Skip to content

Commit

Permalink
Merge pull request #234 from private-octopus/extract-ip-stats
Browse files Browse the repository at this point in the history
Fix sh script issues
  • Loading branch information
huitema authored Mar 10, 2024
2 parents 4e5557f + 792362e commit 010b690
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/imrsrsv.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ def process_date(self, d):
try:
with open(date_tmp, "wt") as F:
for s in this_slice:
F.write(join(self.cbor_instance, s) + "\n")
s_file = join(self.cbor_instance, s)
if os.path.getsize(s_file) > 0:
F.write(s_file + "\n")
merge_cmp = self.cmd + ' -I ' + date_result + " " + date_tmp
cmd_ret = os.system(merge_cmp)
if cmd_ret == 0:
Expand Down
5 changes: 4 additions & 1 deletion src/ipstats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ IPSTATS_DIR="$HOME/ipstats"
IMRS_CBOR=/data/ITHI/cbor/IMRS/
MONTH=202403
SCRIPT="$HOME/ithitools/src/imrsrsv.py"
RUN_DATE=$(date '%(%Y-%m-%d)T\n')
RUN_LOG=`tmp/$RUN_DATE.$$.txt`

echo "Home: $HOME"
echo "ithitools: $ITHITOOLS"
echo "ipstats: $IPSTATS_DIR"
echo "imrs: $IMRS_CBOR"
echo "Month: $MONTH"
echo "Script: $SCRIPT"
echo "Log: $RUN_LOG"

python3.6 $SCRIPT $IMRS_CBOR $IPSTATS_DIR $MONTH $ITHITOOLS
python3.6 $SCRIPT $IMRS_CBOR $IPSTATS_DIR $MONTH $ITHITOOLS > $RUN_LOG

0 comments on commit 010b690

Please sign in to comment.