cat vs paste

cat vs paste

by Leanna Lui -
Number of replies: 1

What's the difference between cat vs. paste? When would I use one versus the other?


Thank you

In reply to Leanna Lui

Re: cat vs paste

by Erik Spence -
The paste command concatenates multiple strings together, and then returns the resulting string. The cat command will concatenate several strings, and then print them to the screen. Which to use depends on what you're doing. If you need the concatenated string for something, such as the input to another function, then use paste, and assign the resulting string to a variable. If you just want to print something to the screen, use cat.