[Swift-devel] Confused about app() command arg parsing/passing
Michael Wilde
wilde at mcs.anl.gov
Thu Dec 13 11:19:20 CST 2012
Im working with a user that has an app coded like this:
app (file n) wgrib2 ( file g2, file nc_table) {
wgrib2 @g2 "-match ':(TMP:2 m |APCP:|CRAIN:|DSWRF:)' -new_grid_winds earth -new_grid_interpolation neighbor -new_grid latlon 220.04\
1666666666:960:0.083333333333 20.041666666666:480:0.0833333333333 - | wgrib2 - -order we:sn -nc3 -nc_table" @nc_table "-netcdf" @n;
}
The user says this app works correctly, but I dont see how:
- I dont see how args bundled within "" from -match through -nc_table get tokenized into single apps
- even more mystifying is I dont see how the parts of the command line around "- | wgrib2" work. I.e. I dont see where this will get placed into a shell for correct interpretation.
When I tried a simple example of this method using "echo" and "wc" as the apps, they fail as I would expect: the args within "" do not get separately tokenized and the "|" is placed on the command line within an arg and is not interpreted by any shell.
I dont think I perturbed this behavior with the recent /usr/bin/time/APP_RESOURCES change in 0.94RC2, but thats possible.
Can anyone explain whether the app command line should work, and if so, how?
Thanks,
- Mike
--
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory
More information about the Swift-devel
mailing list