Questions tagged [paste]
The `paste` utility merges corresponding or subsequent lines of files.
136 questions
0
votes
1
answer
94
views
Can Xfce's Clipman let you cycle the clipboard?
I use Clipman - xfce4-clipman-plugin. I sometimes copy two items and want to paste them both, one then the other. I would expect to be able to paste one (ctrl + v), press some keyboard combo to tell ...
2
votes
0
answers
113
views
The paste command is outputing tabs instead of new lines when used with process substitution
The first command below produces each number on a separate line, and I would expect the second command to do the same thing because the only difference between the two is that we are using echo '1 2 3'...
0
votes
2
answers
309
views
Side by side output from two `tail -f` commands
I have two scripts emitting single string to log files periodically that I need to tail -f and combine side by side for which I am using paste. This works but I am unable to pipe the output to another ...
0
votes
0
answers
1k
views
Copying all files and folders of a directory using tar
I am trying to copy my files from ssd to external hdd using linux live boot.
The command I'm writing is:
root@ubuntu:/media/ubuntu/4bd92f4b-6b48-4f4a-83ad-9d82d3be488b/home/pegasus# tar cf - Downloads ...
1
vote
0
answers
159
views
Pasting non-ascii (utf8) into remote urxvt terminal
For pasting text, in urxvt/rxvt-unicode one can use middle button to paste PRIMARY selection.
I can do such Mouse-Middle-Click paste in my local urxvt terminal and even a remote server, in Chinese/...
5
votes
3
answers
1k
views
Rounding many values in a csv to 3 decimals (printf ?)
I have a paste command like this
paste -d , file1.csv file2.csv file3.csv
And file2.csv contains numbers like this
0.2
0.3339
0.111111
I want the values in file2.csv having 3 decimals like this:
0....
0
votes
3
answers
139
views
Combine .csv-files with different amount of lines
Here I asked already for a similar problem.
Now I have 3 .csv-files but one of them has only 1 line.
file1.csv
dog
cats
mouse
file2.csv
001a
002a
003c
file3.csv
WORD
The output should be
dog,001a,...
1
vote
1
answer
88
views
Combine .csv-files with text between each line
I have two (or maybe more) files:
file1.csv
dog
cats
mouse
file2.csv
001a
002a
003c
If I use paste file1.csv file2.csv the output is
dog 001a
cats 002a
mouse 003c
Of course I can use paste -d ,...
-2
votes
4
answers
119
views
How to keep previous and current line if the previous line contains common text?
How to keep previous and current line if the previous line contains common text?
I have a main file like this:
Hello_world
Anna
Frank
Jeremy
Hello_earth
Jessie
James
I would want 3 output files like ...
2
votes
3
answers
59
views
How to collect both full lines, and matching part of line?
Is it possible to output both the full line and the matched parts of some line?
Suppose I have this input
low [ 0]: 0xffff0000 Interesting description A
hi [ 0]: 0xffff00a0 Interesting description B
...
0
votes
5
answers
857
views
How to merge lines in groups of three
I have a file containing the below pattern, up to 2000 lines. For every group of three lines, the pattern repeats with different numerical values, but text values at the beginning are common up to ...
-2
votes
2
answers
318
views
Merging multiple csv files without data shifting to the left
Im trying to merge several csv files into one big file. All these files have different column lengths and others only have a header (no data). When I use
paste -d "," file1.csv file2.csv ...
1
vote
1
answer
861
views
paste command puts data from csv files vertically line by line instead of horizontally next to each other
I have a few csv-s, each containing 3 columns separated by ",".
Example:
header1,header2,header3
value1,value2,value3
value1,value2,value3
...
Using this tutorial, I thought if I execute ...
2
votes
1
answer
449
views
Remove \r in between merged csv file with paste command
I merged 3 csv files with command like this.
paste -d "," a.csv b.csv c.csv > result.csv
The resulting csv has an unexpected line break in between columns of b.csv and c.csv in each line ...
2
votes
1
answer
498
views
Why does paste command truncate one of the input files?
I have two files which contain only one column of numeric data each, and the same number of rows. When using paste, it does combine the rows from the two files into one row, but the text of the first ...