Linked Questions

121 votes
7 answers
52k views

Various bash commands I use -- fancy diffs, build scripts, etc, produce lots of color output. When I redirect this output to a file, and then cat or less the file later, the colorization is gone -- ...
billc's user avatar
  • 1,971
50 votes
1 answer
35k views

Whenever I use grep, and I pipe it to an other program, the --color option is not respected. I know I could use --color=always, but It also comes up with some other commands that I would like to get ...
edi9999's user avatar
  • 20.7k
0 votes
0 answers
113 views

I tried to pass username and password to the command '/opt/splunk/bin/splunk reload deploy-server' but its throwing "stdin appears to be a pipe" error , help me in fixing this error. [splunk@ip-10-15-...
sudhir tataraju's user avatar
1 vote
0 answers
99 views

Let's do a simple example. This is what the standard output was printed on screen by Terminal. Mac:~ usr$ brew list gdbm libidn2 node python@2 wget gettext ...
Bart Simpson's user avatar
1 vote
0 answers
71 views

We have a third-party Java application that uses System.console().readPassword() method. It cannot be modified. We need to call it from a non-interactive shell script that should pass password to that ...
KirEvse's user avatar
  • 325
0 votes
0 answers
46 views

Consider the following zsh script: echo $(echo "yes") Now, echo takes a string and turns it into standard output. On the other hand, the $(X) notation evaluates X and turns its standard ...
Dominik Teiml's user avatar
1270 votes
23 answers
660k views

How do I call shell commands from inside of a Ruby program? How do I then get output from these commands back into Ruby?
CodingWithoutComments's user avatar
434 votes
4 answers
186k views

What is the difference between the following Ruby methods? exec, system and %x() or Backticks I know they are used to execute terminal commands programmatically via Ruby, but I'd like to know why ...
Mr. Black's user avatar
  • 12.2k
147 votes
6 answers
50k views

When I execute "python" from the terminal with no arguments it brings up the Python interactive shell. When I execute "cat | python" from the terminal it doesn't launch the interactive mode. Somehow, ...
Mike McQuaid's user avatar
  • 9,834
72 votes
4 answers
13k views

1. `` The Backtick defined in Kernel 1. a) %x{} Percent X < alternate syntax for The Backtick defined in parse.y, see discussion 2. system() Kernel#system 3. fork() Kernel#fork, Process#fork ...
Alec Wenzowski's user avatar
49 votes
6 answers
55k views

Basically I'm wondering why this doesn't output anything: tail --follow=name file.txt | grep something | grep something_else You can assume that it should produce output I have run another line to ...
radman's user avatar
  • 18.8k
54 votes
3 answers
17k views

Certain commands produce text in color for readability. I'm using Linux. For example when I'm using rak or hg diff the output is in color for better readability. However when I pipe the output ...
Jon Snow's user avatar
  • 12k
28 votes
6 answers
22k views

I've got a script like: #!/bin/bash exec /usr/bin/some_binary > /tmp/my.log 2>&1 Problem is that some_binary sends all of its logging to stdout, and buffering makes it so that I only see ...
bstpierre's user avatar
  • 31.5k
19 votes
3 answers
18k views

Consider the following C program (test.c): #include <stdio.h> int main() { printf("string out 1\n"); fprintf(stderr, "string err 1\n"); getchar(); printf("string out 2\n"); fprintf(...
gratz's user avatar
  • 1,626
14 votes
7 answers
6k views

A python script is controlling an external application on Linux, passing in input via a pipe to the external applications stdin, and reading output via a pipe from the external applications stdout. ...
grrussel's user avatar
  • 7,379

15 30 50 per page