Link to home
Start Free TrialLog in
Avatar of jewee
jewee

asked on

Command line tool- read from file

I am not sure if this is the right category to post this question.

Lets say I am running a tool from the command line:

./testtool

And I need to follow it with text..

./testtool -d asdfalskdjfalskdfjlaksjdflkajsldfjlasdklfjls

However, I would like the tool to process the text I currently have in a file.

How would I go about doing this?
Avatar of sunnycoder
sunnycoder
Flag of India image

Hi jewee,

You could pass the filename as argument ... Incase you do not have control over working of the tool, you can pass the normal options and redirect input by using < operator

./testtool -d asasddfdf < inputfile

Cheers!
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial