Merge pull request #212 from myfavouritekk/paste

Add a cheatsheet for paste.
This commit is contained in:
Chris Lane 2015-04-15 16:40:43 -04:00
commit f39fad1324

15
cheat/cheatsheets/paste Normal file
View file

@ -0,0 +1,15 @@
# Concat columns from files
paste file1 file2 ...
# List the files in the current directory in three columns:
ls | paste - - -
# Combine pairs of lines from a file into single lines:
paste -s -d '\t\n' myfile
# Number the lines in a file, similar to nl(1):
sed = myfile | paste -s -d '\t\n' - -
# Create a colon-separated list of directories named bin,
# suitable for use in the PATH environment variable:
find / -name bin -type d | paste -s -d : -