run unix command with "exec" within xspec
http://heasarc.nasa.gov/docs/xanadu/xspec/xspec11/manual/node64.html
Unix Shell Commands
Shell commands can be executed within XSPEC using the exec command (see the help entry on the exec command). When running interactively, if tcl cannot find a command which matches that entered on the command line, it will search for a shell command which matches the entered command. If it finds a match, it automatically executes the shell command via exec. Note that this feature is implemented using the tcl unknown procedure, part of which is a script file loaded by tcl at run time, and may be different or not exist on your system. See the section in this help file on the unknown command for more details on how it is implemented in XSPEC.
Note that the tcl exec command executes the given command directly, without first passing it on to the shell. Thus no globbing (ie. expansion of wildcards such *.pha) is performed. If you wish to pass you command through a shell for wildcard expansion, etc, use the syscall command.
If you want to start a subshell from within XSPEC, simple type the command for starting that shell, ie. type csh in order to start a C-shell. Note that typing exec csh will not work properly (the full expanded command name necessary in this case would be exec >&@stdout <@stdin csh ). Giving the syscall command with no arguments will automatically start a subshell using your current shell.
No comments:
Post a Comment