Eric Blake wrote:
On 10/17/2016 01:32 AM, Thorsten Kampe wrote:
* Thorsten Kampe (Mon, 17 Oct 2016 08:25:13 +0200)
the following bash script results in a different output when
redirected to a file.
```
printf "FIRST LINE\n" > /dev/stderr
shopt -os xtrace
printf "SECOMD LINE\n" > /dev/stderr
On 10/17/2016 01:32 AM, Thorsten Kampe wrote:
> * Thorsten Kampe (Mon, 17 Oct 2016 08:25:13 +0200)
>
>> the following bash script results in a different output when
>> redirected to a file.
>>
>> ```
>> printf "FIRST LINE\n" > /dev/stderr
>> shopt -os xtrace
>> printf "SECOMD LINE\n" > /dev/stder
* Thorsten Kampe (Mon, 17 Oct 2016 08:25:13 +0200)
> the following bash script results in a different output when
> redirected to a file.
>
> ```
> printf "FIRST LINE\n" > /dev/stderr
> shopt -os xtrace
> printf "SECOMD LINE\n" > /dev/stderr
> ```
On further inspection: the `xtrace` is not rela
Hi,
the following bash script results in a different output when
redirected to a file.
```
printf "FIRST LINE\n" > /dev/stderr
shopt -os xtrace
printf "SECOMD LINE\n" > /dev/stderr
```
```
$ bash script.sh
FIRST LINE
+ printf 'SECOMD LINE\n'
SECOMD LINE
```
```
$ bash script.sh 2> file && cat
4 matches
Mail list logo