[Swift-user] [New Swift User] Simple .sh file mapping and running

Weiyang Wang frank.wang04 at gmail.com
Tue Mar 8 07:57:24 CST 2011


Hello,

I'm trying to map .sh files and directly execute them by sh myfile.sh but
encounter some errors here. Could anyone help?

####Contents of test.swift####

type SHL {};

SHL shellarray[] <ext;exec="mapper.sh">;

/*app ( SHLout out )shellexecute ( SHL s ){
        sh @filename(s) stdout=@filename(out); // Could anyone add comments
for these lines ? I'm not sure whether an out file is necessary
}*/

app simpleshellexec(SHL s){
        sh @filename(s); // Is this app written correctly?
}

foreach s in shellarray {

        simpleshellexec(s);

}

#####Contents of mapper.sh#####

#!/bin/bash

echo "[0] 0.sh"
echo "[1] 1.sh"

#############################

I'm expecting 0.sh and 1.sh can be run under current directories. Any
corrections/ suggestions from anyone?

Thank you.

Weiyang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20110308/bef291ba/attachment.html>


More information about the Swift-user mailing list