[Swift-commit] r8158 - SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md
wozniak at ci.uchicago.edu
wozniak at ci.uchicago.edu
Wed Aug 13 17:21:26 CDT 2014
Author: wozniak
Date: 2014-08-13 17:21:26 -0500 (Wed, 13 Aug 2014)
New Revision: 8158
Modified:
SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh
Log:
Create tar output
Modified: SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh
===================================================================
--- SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh 2014-08-13 22:13:39 UTC (rev 8157)
+++ SwiftTutorials/ATPESC_2014-08-14/swift-t/examples/05-md/run-local-mds.sh 2014-08-13 22:21:26 UTC (rev 8158)
@@ -1,18 +1,19 @@
-#!/bin/bash -eu
+#!/bin/zsh -eu
-if [[ ${#*} != 7 ]]
+A=( SIMULATIONS STEPS NP ND MASS DT SEED OUTPUT_TAR )
+
+if [[ ${#*} != ${#A} ]]
then
- echo "usage: SIMULATIONS STEPS NP ND MASS DT SEED"
+ echo "usage: ${A}"
exit 1
fi
-SIMULATIONS=$1
-STEPS=$2
-NP=$3
-ND=$4
-MASS=$5
-DT=$6
-SEED=$7
+# Scan argv
+for a in ${A}
+do
+ eval ${a}=$1
+ shift
+done
source ../../cfg/setup-local.sh
source setup-md.sh
@@ -27,3 +28,5 @@
--mass=${MASS} \
--dt=${DT} \
--seed=${SEED}
+
+tar cfz ${OUTPUT_TAR} out-{0..$((SIMULATIONS-1))}.{txt,trj}
More information about the Swift-commit
mailing list