[Swift-commit] r7723 - SwiftApps/swift-galaxy/swift
ketan at ci.uchicago.edu
ketan at ci.uchicago.edu
Mon Mar 17 14:34:24 CDT 2014
Author: ketan
Date: 2014-03-17 14:34:24 -0500 (Mon, 17 Mar 2014)
New Revision: 7723
Modified:
SwiftApps/swift-galaxy/swift/swiftforeachlist.sh
SwiftApps/swift-galaxy/swift/swiftforeachrange.sh
Log:
stdin file expression in source
Modified: SwiftApps/swift-galaxy/swift/swiftforeachlist.sh
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeachlist.sh 2014-03-17 19:21:50 UTC (rev 7722)
+++ SwiftApps/swift-galaxy/swift/swiftforeachlist.sh 2014-03-17 19:34:24 UTC (rev 7723)
@@ -33,9 +33,9 @@
#workout standard input file
if [ "${stdin}" ] ; then
- stdinfile="${stdin}"
+ stdinfilexpr='file stdinfile<'\"${stdin}\"'>;'
else
- stdinfile="/dev/null"
+ stdinfilexpr='file stdinfile<'\"/dev/null\"'>;'
fi
fileargs=()
@@ -69,6 +69,7 @@
}
$stringarrayexpr
$filearrayexpr
+$stdinfilexpr
file exec<"$executable">;
file listfile<"$listfile">;
@@ -76,7 +77,7 @@
foreach l, i in list{
file out <single_file_mapper; file=@strcat("$outloc", "/", l, ".", i, ".out")>;
file err <single_file_mapper; file=@strcat("$outloc", "/", l, ".", i, ".err")>;
- (out,err) = anapp(exec, i, stringargs, fileargs,"${stdinfile}");
+ (out,err) = anapp(exec, i, stringargs, fileargs, stdinfile);
}
EOF
Modified: SwiftApps/swift-galaxy/swift/swiftforeachrange.sh
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeachrange.sh 2014-03-17 19:21:50 UTC (rev 7722)
+++ SwiftApps/swift-galaxy/swift/swiftforeachrange.sh 2014-03-17 19:34:24 UTC (rev 7723)
@@ -39,9 +39,9 @@
#workout standard input file
if [ "${stdin}" ] ; then
- stdinfile="${stdin}"
+ stdinfilexpr='file stdinfile<'\"${stdin}\"'>;'
else
- stdinfile="/dev/null"
+ stdinfilexpr='file stdinfile<'\"/dev/null\"'>;'
fi
fileargs=()
@@ -78,12 +78,13 @@
$stringarrayexpr
$filearrayexpr
+$stdinfilexpr
file exec<"$executable">;
foreach i in [$rstart:$rend:$stepsize]{
file out <single_file_mapper; file=@strcat("$outloc", "/", i, ".out")>;
file err <single_file_mapper; file=@strcat("$outloc", "/", i, ".err")>;
- (out,err) = anapp(exec, i, stringargs, fileargs, "${stdinfile}");
+ (out,err) = anapp(exec, i, stringargs, fileargs, stdinfile);
}
EOF
More information about the Swift-commit
mailing list