Szerző: Florian Zieboll Dátum: Címzett: [DNG] Tárgy: [DNG] OT: redirecting piped / processed stderr to a file
Hallo list,
may I ask for support with redirecting piped / processed stderr to a file?
dd prints it's progress to stderr, I can redirect it to a file:
$ dd if=/dev/zero of=./zeroes bs=4M count=1000 status=progress 2> ./file
Now I want to get rid of the CR and can print to the console as expected:
$ dd if=/dev/zero of=./zeroes bs=4M count=1000 status=progress 2>&1 | tr '\r' '\n'
But if I redirect tr's output to a file (or pipe it otherwise), it "disappears": Empty console and empty file.
$ dd if=/dev/zero of=./zeroes bs=4M count=1000 status=progress 2>&1 | tr '\r' '\n' > ./file