0
votes
1answer
71 views

What could block the output of a command?

Sometimes I'll attempt a (2>&1) redirection and some/all of the resulting output appears to be silenced. e.g. wget -O- http://localhost/test.txt 2>&1 I would expect to see a merge of ...
-1
votes
1answer
109 views

Bash Redirection Encoding [closed]

I'm trying to use the command base64 somefile.ext to covert files to text. The only problem is that the file size increases by 35%, and that becomes unacceptable for my larger files. I suspect that ...
0
votes
3answers
178 views

SH conditional redirection [closed]

I want to be able to redirect some output of my script to /dev/null based on a command line switch. I don't know how should I do it. In a silly way, it would be something like this (in a too ...
2
votes
3answers
2k views

redirect temporarily STDOUT to another file descriptor, but still to screen

I'm making a script that executes some commands inside, and these commands show some output on STDOUT (and STDERR as well, but that's no problem). I need that my script generates a .tar.gz file to ...
1
vote
1answer
147 views

mirror STDOUT and STDERR to file by default

How I can accomplish STDOUT to be to logged in a file (appending), but preserving the flow (leave STDOUT to STDOUT) ? STDOUT should work transparently, but should be logged also into a file, without ...
1
vote
1answer
581 views

Non-blocking bash redirection

Does anyone know how to redirect the output of a program, running from a bash script, to a named pipe IN NON BLOCKING MODE (having 'O_NONBLOCK' flag set)?
1
vote
3answers
1k views

Run FTP session from bash script

I'm trying to write a BASH script to test if an FTP site that I own is running. I therefore want the bash script to connect to the FTP site, log in with a dummy account and redirect the output to a ...
10
votes
7answers
4k views

create 'virtual file' from bash command output?

I wonder if there is a way to create a 'virtual file' from a bash output. Example: Let's say I want to email the output of mysqldump as an attachment to an external email address. I can use mutt to ...