Jump to content
Sign in to follow this  
iamtheky

piping bash command results on Win10

Recommended Posts

iamtheky

So you need a couple of things.

1) a plain text file with a bash command like:

   

sudo apt-get upgrade

 

saved as upgrayedd.txt and relative to a script that executes this:

#include<array.au3>
#include <WinAPIFiles.au3>
#RequireAdmin

_WinAPI_Wow64EnableWow64FsRedirection(FALSE)

$log = "upgrayedd_STDOUT.txt"

$iPID = runwait("bash upgrayedd.txt > " & $log, @ScriptDir & "/", @SW_SHOW)

_ArrayDisplay(stringsplit(fileread($log) , "..." , 3))

 

 

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×