i have the following statement
for i in `cat i.txt`; do wine ~/run.exe $i.asc >> out.asc; done
but it keeps writing all the output to console not the file 'out.asc'. plz can you help me to redirect the output to file rather than screen. thanks in advance!
It might be that wine is writing to stderr, so you need to redirect that:
for i in `cat i.txt`; do wine ~/run.exe $i.asc 2>> out.asc; done
Notice the 2 in the 2>> operator, this means stderr.
try with redirecting stderr (2) to stdout (1)
for i in `cat i.txt`; do wine ~/run.exe $i.asc >> out.asc 2>&1; done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With