cat vs paste

cat vs paste

par Leanna Lui,
Nombre de réponses : 1

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


Thank you

En réponse à Leanna Lui

Re: cat vs paste

par 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.