tools4j / unix4j

An implementation of Unix command line tools in Java.
unix4j.org
MIT License
231 stars 43 forks source link

Running raw commands #78

Open shaiyahleba opened 2 years ago

shaiyahleba commented 2 years ago

Hi,

How can I run raw commands? For example, if I have the string "cat file.log | grep aaa", and I want to run it without using the pre-defined functions (i.e cat("file.log").grep("aaa")).

I guess it has something to do with LineOperation but I didn't see any usage example and I cant figure it out. Thanks!

terzerm commented 2 years ago

Can you elaborate a bit what exactly you want to achieve? I.e. why do you not want to use the predefined functions?

shaiyahleba commented 2 years ago

Let's say that the user provides some piped command, e.g. 'cat file.log | grep aaa | grep bbb' and I want to run this command using unix4j, how can this be achieved? is this possible?

I want this functionality because we might want to run some additional commands on top of the command provided by the user and we want all the set of commands to be under the same unix4j builder.