cat vs paste

Re: cat vs paste

by Erik Spence -
Number of replies: 0
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.