August 3, 201114 yr Hi, I have tried to do an script to save an URL as html with "WGET" command. If I use the shell command line to put: wget --convert-links -O FileName.html "http://www.google.com" It´s working and a "FileName.html" file is saved in my root directory but when I try to obtain this result in Filemaker with RunShellScript, it is not possible. Could anyone help me?? The URL is saved as a global variable ($$datlink). I have created the different steps in my script but I only get an message: "ERROR" STEPS into my script: Set variable [$command; value:"wget " & "--convert-links " & "-O " & DB::FileName & " " & "\"" & $$datlink & "\""] Set field [DB::Container; RunShellScript( $command ; "true" ; 10 )] Help me!!!! Please Thanks Wardiam
August 9, 201114 yr What is the error message that you get when you call this function? You can see details about your last error by calling SMLastError or by looking at your plugin logs.
August 25, 201114 yr Author Dear Smef, I'm sorry for my late reply but I have been on holidays the last two weeks. Thank you very much for your answer. I have called the SMLastError function at the end of my script and this is the message: "java.lang.RuntimeException: /bin/sh: wget: command not found". For the message I understand that this command "wget" is not found but I don't understand where is the problem because if I open the console-terminal and I call the "wget" command It works. Could you help me? Wardiam.
August 26, 201114 yr Hi Wardiam, have a try providing the full path to `wget' ... Set variable [$command; value:"/usr/local/bin/wget" & Char ( 32 ) & "--convert-links" & Char ( 32 ) & "-O" & Char ( 32 ) & DB::FileName & Char ( 32 ) & "\"" & $$datlink & "\""]/* etc...*/ which -- locate a program file in the user's path /*searches your user-specific PATH (which may include some of the locations whereis searches, and may not include others - it might also include some places that whereis doesn't search if you'd added to your PATH*/ whereis -- locate programs /*searches the standard *nix locations for a specified command.*/
August 26, 201114 yr Author Thanks clemhoff for your reply. I have checked that "wget" is located into that path and it's right. I have used your recommendations and I have changed the script to: Set variable [$command; value: "/usr/local/bin/wget" & Char ( 32 ) & "--convert-links" & Char ( 32 ) & "-O" & Char ( 32 ) & Import Files::File Name & Char ( 32 ) & "\"" & $$datlink & "\""] Now the new error message is: "java.lang.RuntimeException: Process was interrupted; error output is:" What do you think??? Wardiam
Create an account or sign in to comment