|
From: | Yuri |
Subject: | Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command |
Date: | Wed, 13 Nov 2024 15:47:36 -0800 |
User-agent: | Mozilla Thunderbird |
Hi !microsuxx, But I need to save the output of the user script into a dedicated log file.This script should run, should save its output into a dedicated log, and then many other commands should use these environment variables.
Their logs can't be combined into one. Yuri On 11/13/24 15:36, #!microsuxx wrote:
what u need to do with the vars include all code in tee or try exec > >( tee -a log ) 2>&1 set -x . my.bash ... what i firstly meant : #!/bin/bash tee -a log < <( all code here set -x ; . code ; other code that needs the vars set maybe needs a 2> smth ) try ( set -x . mybash vars_code ) |& tee -a log
[Prev in Thread] | Current Thread | [Next in Thread] |