0
votes
3answers
48 views

why pipes are used instead of input redirection

I'm new to linux systems and I can't really understand why wee need two operators that can redirect output: pipe as | and ouput redirection operator >? Can't we just always use the second? Most of ...
0
votes
2answers
384 views

Problem in redirecting standard input and output

I want to take backup of my mysql data using mysqldump. I have three files containing names of mysql tables line by line. My script has this line - mysqldump -h localhost -uroot --lock-tables=false ...
2
votes
2answers
3k views

Redirect stdout to file and stderr to file and to screen

I am running valgrind to shake out bugs in my program. Valgrind's memcheck prints to stderr. What I want to do is a modification to this: valgrind --tool=memcheck ./a.out >output 2>grindout But, I ...
6
votes
1answer
2k views

how to get output of a script/program into a file?

I am compiling a program using make and want the output of make to be written to a file. I have tried using > operator like make > build_log.txt and using tee command like make | tee ...