Redirect terminal output to file

Questions about Wine on Linux
Locked
User avatar
malonn
Level 2
Level 2
Posts: 27
Joined: Tue Oct 05, 2021 12:10 pm

Redirect terminal output to file

Post by malonn »

I'm having trouble redirecting terminal output from a program I launched with Wine to a file. Here's the script I use to launch the file:

Code: Select all

#!/usr/bin/bash

path=/home/mark/.local/share/lutris/runners/wine/wine-tkg-staging-7.6.r0/bin
WINEPREFIX=$HOME/Oblivion $path/wine start 'C:\The Elder Scrolls IV\Tools\LOOT\LOOT.exe' 1> LOOT.log
The .log file is created, but there are no contents.

Any ideas?
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: Redirect terminal output to file

Post by jkfloris »

According to the WineHQ Wiki, there are two ways to redirect the output.

Code: Select all

WINEPREFIX=$HOME/Oblivion $path/wine start 'C:\The Elder Scrolls IV\Tools\LOOT\LOOT.exe' &> LOOT.log
# or if you also need the error messages
WINEPREFIX=$HOME/Oblivion $path/wine start 'C:\The Elder Scrolls IV\Tools\LOOT\LOOT.exe' >> LOOT.log 2>&1
User avatar
malonn
Level 2
Level 2
Posts: 27
Joined: Tue Oct 05, 2021 12:10 pm

Re: Redirect terminal output to file

Post by malonn »

Rock on, jkfloris. Man, I really need to check that wiki more often...
Locked