cmdStrings := exec.Command("strings", dynamicFilePath)
cmdRegex := exec.Command("grep", "regex")
cmdRegex.Stdin = cmdStrings.Stdout
if err := cmdRegex.Start(); ...
if err := cmdStrings.Run(); ...
if err := cmdRegex.Wait();...


Or use http://labix.org/pipe 

[email protected] a következőt írta (2020. augusztus 12., szerda, 
17:41:39 UTC+2):

> Hi all,
>
> I have requirement to execute a command like cmd : *strings 
> dynamic_file_path | grep regex*
>
> I don't know what is the best way to do this like any well known library 
> or standard way.
>
> Can you please help here?
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/b679e9f0-5ed0-46ca-a4e2-11785df7d5c6n%40googlegroups.com.

Reply via email to