If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Calling Shell script from VB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-05-04, 07:28
arunprasadlv arunprasadlv is offline
Registered User
 
Join Date: Mar 2004
Location: India
Posts: 41
Calling Shell script from VB

Hi ,

I want to call the a unix shell script present in the remote sever
using Visual Basic Application.

Is it possible to invoke the shell script present in the remote server
and get the output of the script in a Excel format.

Pls Throw some light to this question.

Thanks and Regds,
Arun
Reply With Quote
  #2 (permalink)  
Old 04-19-04, 09:42
rkrishnan73 rkrishnan73 is offline
Registered User
 
Join Date: Mar 2004
Posts: 10
Re: Calling Shell script from VB

Quote:
Originally posted by arunprasadlv
Hi ,

I want to call the a unix shell script present in the remote sever
using Visual Basic Application.

Is it possible to invoke the shell script present in the remote server
and get the output of the script in a Excel format.

Pls Throw some light to this question.

Thanks and Regds,
Arun
You may run a batch file from inside VB. The batch file in turn opens a telnet session with a server and calls the script. You can create an exclusive user in the unix box thro' which the telnet session will be logged in. The profile of this user will run the script on logging in. You may have to then copy (ftp?) the tab/comma separated file to the local machine and then to a Excel import through some OLE function.

I guess, its very complicated and hence would suggest you to try simpler means of achieving what you would want.
Reply With Quote
  #3 (permalink)  
Old 05-26-04, 01:17
rraajjiibb rraajjiibb is offline
Registered User
 
Join Date: May 2004
Posts: 5
Yes definitely u can do that...


Just use the call shell() function of VB.

Using the I/O write a small batch file containing the
rsh commands and pass that batch file name inthe call shell("batch file xx",1)

It will be run
e.g

Call Shell("D:\HOM\FCISOURCE\FCI.bat", 1)

the FCI.bat looks like
rsh 97.241.94.226 -l rajib -n /omp/bin/DBsurvey -i /home/jlizama/QUERY.txt -o /home/rajib/fciall.xls
...

I hope u got the idea
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On