Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4856 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

  • 3 weeks later...
Posted

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.

Posted

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.*/

Posted

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

This topic is 4856 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.