![]() ![]() You see that basically you script-call is of course just a call to the MathKernel. "/usr/local/Wolfram/Mathematica/8.0/SystemFiles/Kernel/Binaries/Linux-x86-64/MathKernel", Looking into the output you probably stumble over the line execve( ![]() You could now use strace to track down what happens (maybe you better redirect the output into a file) strace -s 128. The first error message is quite clear: the system cannot open the file /SystemFiles/CharacterEncodings/ISO8859-1.m and obviously the system is correct, because this file does not exist in this directory. If you installed Mathematica in a different directory, you have to adjust the path of $TopDirectory. ![]() Using this technique to check for drive existence depends on device driver implementation and may not always work.Use this as first line of your script: #!/usr/local/bin/MathematicaScript -runfirst "$TopDirectory=\"/usr/local/Wolfram/Mathematica/8.0\"" -script In the case of checking for drive existence, however, caveats exist:Īn Abort, Retry, Fail? error occurs if the drive is not formatted. This behavior is documented in a Microsoft knowledge base article ( ) and I have confirmed its behavior on FreeDOS 1.1 and in a Windows 7 command shell.ĮXTRA: The KB article indicates this technique can also be used to see if a drive is present. Checking for its existence is equivalent to a check for the directory's existence. It turns out that to support constructs like appending >NUL on command statements, there is a sort of virtual file named "NUL" in every directory. Fortunately, there is an obscure workaround: C:\> IF NOT EXIST C:\FOLDER\NUL ECHO C:\FOLDER missing.Ĭ:\> IF EXIST C:\FOLDER\NUL ECHO C:\FOLDER exists. The EXIST function returns the same result for both missing and present folders. Unfortunately, the above does not work for directories. The solution when the resource is a file it is pretty straight-forward as indicated by others: C:\> IF EXIST C:\CONFIG.SYS ECHO C:\CONFIG.SYS exists. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |