Skip to content

Commit

Permalink
add a cp_and_decompress script
Browse files Browse the repository at this point in the history
  • Loading branch information
dpark01 committed Dec 12, 2023
1 parent e1d81e0 commit 47575f4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/cp_and_decompress.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

INFILE=$1
OUTFILE=$2

if [[ $INFILE == *.gz ]]; then
pigz -dc $INFILE > $OUTFILE
elif [[ $INFILE == *.zst ]]; then
zstd -d $INFILE -o $OUTFILE
else
cp $INFILE $OUTFILE
fi

0 comments on commit 47575f4

Please sign in to comment.