Comment by creshal
11 years ago
paste was my most recent "holy shit this saves so much time" discovery. I blame it on the not quite intuitive name.
11 years ago
paste was my most recent "holy shit this saves so much time" discovery. I blame it on the not quite intuitive name.
What do you use it for?
One use is converting columns of numbers into math strings for bc.
Example (contrived):
Or converting columns of strings into regex 'or' clauses for searching (contrived example again):
I've used paste all my life, but I never knew you could do
to convert stdin into 2 columns (or "paste - - - -" to get 4 columns!). TIL ...
seq has the -s flag which voids the need of the paste for that command:
But I agree that the paste is very useful.
1 reply →
ahah, so that's where R's paste() function comes from...
Together with cut to parse CSV files and e.g. convert a text column into a row.