[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

To read a csv file and passing the arguments to an application running in Unix

Posted on 2007-11-20
3
Medium Priority
?
498 Views
Last Modified: 2013-12-26
I need to use HummingBird Macros to read a csv file and passing the values to an application running in Unix.
Also, I have to copy the screen from Host Explorer, launch Microsoft Word and paste it on to Word.

More Details:

I have Humming bird Exceed to login into Unix box.

 CSV file will looks as follows: (csv file is inside unix server)
------------------------------------------------
X1,Y1,Z1
X2,Y2,Z2
-------------------------------------------------
I want read line by line at once.

(eg) in the first loop, X, Y, Z variable values should like
      X="X1" and Y=”Y1” and Z=”Z1”

in the second loop, X, Y, Z variable values should like
     X="X2" and Y=”Y2” and Z=”Z2”

like.. etc.
These variable values to be passed to the required fields in the application.
Then, I have to capture screen, launch Microsoft word and paste it onto word. And whatever screen copied should be appended onto the same word document.

I am new to Hummingbird emulator. Is it possible? If yes, How can I acheive this?
Please help me.
0
Comment
Question by:manik_mani
1 Comment
 
LVL 6

Accepted Solution

by:
Talmash earned 2000 total points
ID: 20390844
csv file is an excel format with spaces as delimiters.

you need regular expression to fetch out x,y,z:

perl -ne '/(\w+),.{5}(\w+).*,.{5}(\w+)/&&print"$1\t$2\t$3\n"' file.csv

you need to play a little with the .{5} until it's "catch" Y2/Z2.

.{5} means skip 5 chars.

tal
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Progress

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question