1
vote
1answer
48 views

redirect one bash line to stdout/terminal vs log

I have a bash script where I'm redirecting output into a file for logging. if test -t 1; then # stdout is a terminal exec > $OUTPUT_FILE 2>&1 else # stdout is not a terminal, no ...
0
votes
2answers
413 views

how to redirect file write from home folder to specific folder in UNIX

I did a search and didn't find what I was looking for. I finally found a beginners UNIX book that I like. I am going through some examples and I notice output is generated in the home folder. I am ...
2
votes
1answer
257 views

Splitting output to two terminals

How can I split an output of a command to two terminals? one will get stdout and the other will get stderr. The best I could do is: On first terminal: bash command args 2> errors and on second ...
3
votes
1answer
1k views

copy (split?) stdout instead of redirecting it

In Bash, I'd like to redirect stdout to a file (>> mylog.txt) but also see the stdout output on the screen.. How can I do it with bash?
0
votes
3answers
186 views

File redirection in bash

What's the difference between using > and >>? How can I use both < and > (redirection operators) in a single command?
6
votes
2answers
11k views

Redirect input from one terminal to another

I have sshed into a linux box and I'm using dvtm and bash (although I have also tried this with Gnu screen and bash). I have two terminals, current /dev/pts/29 and /dev/pts/130. I want to redirect ...