[Swift-commit] r7832 - SwiftApps/swift-galaxy/swift
ketan at ci.uchicago.edu
ketan at ci.uchicago.edu
Wed May 7 10:04:37 CDT 2014
Author: ketan
Date: 2014-05-07 10:04:37 -0500 (Wed, 07 May 2014)
New Revision: 7832
Added:
SwiftApps/swift-galaxy/swift/script.swift
Modified:
SwiftApps/swift-galaxy/swift/test.sh
Log:
swift source for debug
Added: SwiftApps/swift-galaxy/swift/script.swift
===================================================================
--- SwiftApps/swift-galaxy/swift/script.swift (rev 0)
+++ SwiftApps/swift-galaxy/swift/script.swift 2014-05-07 15:04:37 UTC (rev 7832)
@@ -0,0 +1,21 @@
+import files;
+import string;
+import io;
+
+app (file _out, file _err) anapp(file _exec, int _i, string _stringargs[], file _fileargs[], file _stdin){
+ "bash" _exec _i _stringargs _fileargs @stdin=_stdin @stdout=_out @stderr=_err;
+}
+
+main{
+ string stringargs[]=["hello","there","T"];
+ file fileargs[];
+ file stdinfile = input("/dev/null");
+
+ file exec=input("x.sh");
+ foreach i in [0:99:1]{
+ file out <sprintf("tmpoutlist/%i.out", i)>;
+ file err <sprintf("tmpoutlist/%i.err", i)>;
+ (out,err) = anapp(exec, i, stringargs, fileargs, stdinfile);
+ }
+ printf("%s", "Done!");
+}
Modified: SwiftApps/swift-galaxy/swift/test.sh
===================================================================
--- SwiftApps/swift-galaxy/swift/test.sh 2014-05-07 13:58:56 UTC (rev 7831)
+++ SwiftApps/swift-galaxy/swift/test.sh 2014-05-07 15:04:37 UTC (rev 7832)
@@ -11,7 +11,7 @@
cat << EOF > x.sh
#!/bin/bash
-echo $@
+echo \$\@
EOF
chmod 755 x.sh
More information about the Swift-commit
mailing list