I use Ubuntu 14.04. When i execute ls | tee - it works fine. But pwd | tee - just output absolute path only once and does not exit! i need to Ctrl+C to stop it.

NEED to Ctrl+C to exit!

Any clue?

EDIT: I use bash.

closed as off-topic by PSkocik, Anthon, X Tian, Archemar, dr01 Oct 13 '15 at 10:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – PSkocik, X Tian, Archemar, dr01
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 5
    What does not work mean? – cuonglm Oct 13 '15 at 4:26
  • 1
    What is your shell? – cuonglm Oct 13 '15 at 6:34
  • 1
    Can we assume that the plain pwd command works correctly?  Please try the following commands and post their results: type pwd, pwd | cat, pwd | od -cb, "\pwd" | tee -, and (exec pwd) | tee -.  Please do not respond in comments; edit your question to make it clearer and more complete.  And please post the terminal output as text rather than as screen shots.  … … … … … … … … … … …  Wait — how are you posting screen shots?  You shouldn't have that privilege yet. – Scott Oct 13 '15 at 8:17

I am currently using Ubuntu 14.04 and I have checked your command, "It was working for me!".

I guess the shell which you are using is different from mine.

Usually tee command will take the input from the standard input and throws the output to the standard output if we don't specify the input/output explicitly.

  • It would help if you mentioned which shell you are using too. ;-) – X Tian Oct 13 '15 at 8:08
  • 1
    :) I am using bash shell. – Bidyut Oct 13 '15 at 16:03

Oh, i made a mistake. i use bash, and i check my .bashrc, find alias pwd='pwd && pwd | xclip'. so the pwd | tee - actually turns into pwd && pwd | xclip | tee -. pwd give its output to xclip and tee - waits for input, that explains why the command does not exit.

Not the answer you're looking for? Browse other questions tagged or ask your own question.