Skip to content

Commit

Permalink
Merge pull request sonic-net#100 from yxieca/yxieca/core_dump
Browse files Browse the repository at this point in the history
[core dump] remove number of parameter assumption from script coredump-compress
  • Loading branch information
yxieca authored Aug 29, 2017
2 parents d1ded16 + 5a12812 commit b82ea42
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/coredump-compress
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#!/bin/sh
#!/bin/bash

/bin/gzip -1 - > /var/core/$1.$2.core.gz
# Collect all parameters in order and build a file name prefix
PREFIX=""
while [[ $# > 0 ]]; do
PREFIX=${PREFIX}$1.
shift
done

/bin/gzip -1 - > /var/core/${PREFIX}core.gz

0 comments on commit b82ea42

Please sign in to comment.