Assigning output of command to a variable

Hi all,

I’m trying to figure out howto get the output of my shell cmd into a variable

Dim cmd As String

    Dim x As Variant

cmd = "/usr/bin/ls"

x = Shell( cmd )

Anyone any idea

Subject: Store result in a file

Assuming that you in fact is doing something more advances than a file listing using ls (if that is the case, use the built-in Dir() function instead), the only way I can think about it is to store the result in a file (text file) and then have the Lotusscript code read the contents of that file after it is created.