I used both command lines and displayed the same output
50949
Wouldn't it be more consistent if one of these always worked?
33496
I have a script that outputs text to stdout. I want to see all this output in my terminal, and at the same time I want to filter some lines and save them in a file. Example:  $ myscript Line A Line B Line C  $ myscript | grep -P 'A|C' &gt; out.file  $ cat out.file Line A Line C   I want to see output of first command in terminal, and save the output of the second command in a file. At the same time. I tried using tee, but with no result, or better, with .
82783
How do you access the command line or run option to put the commands into the system?
33020
What is the easiest way to add a text to the beginning of another text file in Command Line (Windows)?
45267
I would like to use the same pipe for different applications, like in:  cat my_file | {   cmd1   cmd2   cmd3 }   Cmd1 should consume part of the input. Cmd2 should consume another part and so on.  However, each cmd eats more of the input then it read really needs due buffering.  For example:  yes | nl | {    head -n 10 &gt; /dev/null   cat  } | head -n 10   Outputs from line 912 instead of line 11.  Tee is not a good option, because each command is supposed to consume part of the stdin.   Is there a simple way to get this working?
96943
I could use the either form to execute the cat method:  cat file_name cat &lt; file_name   The result is the same  Then I want to execute man in the format of stdin  man &lt; file_name   While file_name contains:  # file_name cat   But it pops up  What manual page do you want? instead of execute man cat.  I want to know why cat could accept stdin as arguments but man cannot.  And what's the difference between command line arguments and stdin?
115653
When I execute a command from a terminal that prints coloured output (such as ls or gcc), the coloured output is printed. From my understanding, the process is actually outputting , and the terminal formats the colour.  However, if I execute the same command by another process (say a custom C application) and redirect the output to the application's own output, these colours do not persist.  How does a program decide whether or not to output text with colour format? Is there some environment variable?
104631
Is there a difference between those two lines ?   /home/user/script.sh &gt;&gt; /home/user/stdout_and_error.log  2&gt;&amp;1 /home/user/script.sh 2&gt;&amp;1 &gt;&gt; /home/user/stdout_and_error.log     knowing that I would like to put the stdout and execution errors of the script in the log file. If there are no differences, what if I would like to log the logging itself?
35015
What's the difference between executing a script like this:  ./test.sh  and executing a script like this:  . test.sh?  I tried a simple, two-line script to see if I could find if there was a difference:  #!/bin/bash ls   But both . test.sh and ./test.sh returned the same information.
116044
I was testing an example snap when I interrupted Ctrl+c when it had downloaded and was reading the packages. The output showed some python stuff. After that I installed the packages normally. Apt is working fine, checked the logs and they look good. I also ran dpkg --configure -a and saw no output. So am I good? I always have this feeling that something can go wrong and I wouldn't know about it.
104894
How can I switch the command output language from my native language to English, so I can post my Ask Ubuntu question with English command output (error messages)?
19851
Basically, this is the issue:  $ echo Hello"$(printf '\n')"World HelloWorld   What did I overlook ?
59294
I'm using the following command in a script to get synthetic wifi info:  echo "$(     iw dev wlp1s0 link |     grep '^\s*SSID:\s' |     sed -r 's/^\s*SSID:\s//' ) $(     iw dev wlp1s0 link |     grep '^\s*signal:\s' |     sed -r 's/^\s*signal:\s//' )"   It works, and the output is like:  MySSID -46 dBm   However, it feels stupid to make the same call to iw dev wlp1s0 link twice, when I know that the result is going to be the same. Also, I would like to avoid having to store the output from iw in a temporary variable.  Is there something I can do, maybe using tee, to "duplicate" the output from iw to two jobs and then concatenate the results?
79065
I'm trying to figure out which of these interfaces I need to implement. They both essentially do the same thing. When would I use one over the other?
2713
I wrote a simple program to print "hello world". The compiler shows a message "Compilation finished successfully". But the out put of the program, I can't see anywhere.    As using codeblocks a new terminal comes out with the program output. How can I see the program output using geany compiler.
120653
cat file1  foo ice two   cat file2  bar cream hundred   Desired output:  foobar icecream twohundred   file1 and file2 will always have the same amount of lines in my scenario, in case that makes things easier.
53614
There are some commands which filter or act on input, and then pass it along as output, I think usually to stdout - but some commands will just take the stdin and do whatever they do with it, and output nothing.  I'm most familiar with OS X and so there are two that come to mind immediately are pbcopy and pbpaste- which are means of accessing the system clipboard.  Anyhow, I know that if I want to take stdout and spit the output to go to both stdout and a file then I can use the tee command. And I know a little about xargs, but I don't think that's what I'm looking for.  I want to know how I can split stdout to go between two (or more) commands. For example:  cat file.txt | stdout-split -c1 pbcopy -c2 grep -i errors   There is probably a better example than that one, but I really am interested in knowing how I can send stdout to a command that does not relay it and while keeping stdout from being "muted" - I'm not asking about how to cat a file and grep part of it and copy it to the clipboard - the specific commands are not that important.  Also - I'm not asking how to send this to a file and stdout - this may be a "duplicate" question (sorry) but I did some looking and could only find similar ones that were asking about how to split between stdout and a file - and the answers to those questions seemed to be tee, which I don't think will work for me.  Finally, you may ask "why not just make pbcopy the last thing in the pipe chain?" and my response is 1) what if I want to use it and still see the output in the console? 2) what if I want to use two commands which do not output stdout after they process the input?  Oh, and one more thing - I realize I could use tee and a named pipe (mkfifo) but I was hoping for a way this could be done inline, concisely, without a prior setup :)