Linux from VB instructions
I want to run a Linux shell script from VB. I want to execute a Linux script on a Linux server running Red Hat 8.0 from a VB program in Windows and obtain the result in VB program output. Is it possible? If it is, please explain the necessary steps.

    Requires Free Membership to View

    When you register, my team of editors will also send you resources covering Linux administration and management; integration and interoperability between Linux, Windows and Unix; securing Linux and mixed-platform environments; and migrating to Linux.

    Cathleen A. Gagne, Senior Editorial Director

    By submitting your registration information to SearchEnterpriseLinux.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchEnterpriseLinux.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

The answer is to use VB socket programming. This transcript from a TechTarget webcast may be just what you need.

I think you need to look at Linux socket programming. This page explains how to do this with C++ for a PRG system. It's not an apples-to-apples example, but it's conceptually the same.

The long of the short of it is that I think you need to open a socket to the Linux server and then execute the script, capture the data, parse the data and then let your application take action on it.

This was first published in December 2004