Excel Macro to read lines from Unix window

boynextdoor6

New Member
Joined
Jun 14, 2012
Messages
1
Hi,

I am wondering if i can get help to develop an excel macro with which we can read lines from another window - unix window.

Sending commands to that window can be done using Send keys method, but now i need to read the result of the commands that i have sent to the unix window.

For example:

When i send keys "ls -t" command to the unix window, it will list all the files present in the directory. Now i have to check for one particular file name among the list. This is just an example, the thing is that i need to read those lines out of that window. Thanks a advance!

CPPCHAK@M025053 ~/sanity_automation/res
$ ls -t
pnrchg120615 pnrrgc120615 pnrope120615 pnrffp120615 pnrspk120615 pnrssr120615
pnrcon120615 pnracc120615 pnrsfr120615 pnrctc120615 pnrese120615 pnrsea120615
pnrbag120615 pnrpdi120615 pnrfar120615 pnrrmk120615 pnrosi120615 pnrhdr120615

Cheers!
Charan
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
This is definitely off topic here, but I have used Autohotkey to automate similar work processes in the past - reducing 30 keystrokes to 1 to get certain data from one program (SAP in my case) into Excel. They also have great forums where you can get help :)
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,462
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top