[Swift-commit] r7824 - SwiftApps/swift-galaxy/swift
ketan at ci.uchicago.edu
ketan at ci.uchicago.edu
Tue May 6 12:26:22 CDT 2014
Author: ketan
Date: 2014-05-06 12:26:22 -0500 (Tue, 06 May 2014)
New Revision: 7824
Modified:
SwiftApps/swift-galaxy/swift/swiftforeach.sh
Log:
Swift T works for simple case
Modified: SwiftApps/swift-galaxy/swift/swiftforeach.sh
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeach.sh 2014-05-06 17:04:31 UTC (rev 7823)
+++ SwiftApps/swift-galaxy/swift/swiftforeach.sh 2014-05-06 17:26:22 UTC (rev 7824)
@@ -66,9 +66,17 @@
#workout standard input file
if [ "${stdin}" ] ; then
- stdinfilexpr='file stdinfile<'\"${stdin}\"'>;'
+ if [ "${k_or_t}" = "swiftK" ] ; then
+ stdinfilexpr='file stdinfile<'\"${stdin}\"'>;'
+ else
+ stdinfilexpr='file stdinfile = input('\"${stdin}\"');'
+ fi
else
- stdinfilexpr='file stdinfile<'\"/dev/null\"'>;'
+ if [ "${k_or_t}" = "swiftK" ] ; then
+ stdinfilexpr='file stdinfile<'\"/dev/null\"'>;'
+ else
+ stdinfilexpr='file stdinfile = input('\"/dev/null\"');'
+ fi
fi
#workout the array only if user adds args else make it blank
@@ -203,15 +211,16 @@
$filearrayexpr
$stdinfilexpr
- file exec=input_file("$executable");
- file listfile=input_file("$listfile");
+ file exec=input("$executable");
+ file listfile=input("$listfile");
- string list[] = split(read(input_file(listfile)),"\n");
+ string list[] = split(read(listfile),"\n");
foreach l, i in list{
file out <sprintf("$outloc/%s.%i.out", l, i)>;
file err <sprintf("$outloc/%s.%i.err", l, i)>;
(out,err) = anapp(exec, i, stringargs, fileargs, stdinfile);
}
+ printf("%s", "Done!");
}
EOF
More information about the Swift-commit
mailing list