4

What is the UNIX shell program that just returns input?

For example

> echo "test" | $pass
> test # output

3 Answers 3

11

You can use cat.

When cat is used without any command line arguments. It just copies the standard input to standard output.

Sign up to request clarification or add additional context in comments.

2 Comments

hmmm... I guess it is obvious - could not figure out though
Also, to make clear that you want cat specifically to read stdin, there's cat -
1

cat

Comments

1

cat .

Note

There's also tac which performs the reverse of cat.

1 Comment

To be clear, tac prints the lines in reverse order.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.