The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
37 views

Cut and Paste Commands

So I have: $ cat fruits 2 bananas 3 cherries 4 figs 5 dates 6 elderberries 7 apples 8 grapes and 1 $ cat prices 2 2.18 3 4.11 4 1.69 5 4.52 6 1.73 7 1.01 8 1.09 Every line from 'fruits' ...
3
votes
1answer
46 views

Use paste with row-major input

I can create a file with multiple columns from a single-column input via paste like this: some_command | paste - - This works when some_command produces the data in column-major format. In other ...
2
votes
4answers
142 views

Concatenate different fields with different seperator

I have a tab delimited file like this: chr1 53736473 54175786 chr1 56861276 56876438 chr1 57512145 57512200 I want to concatenate the three fields result like this: ...
4
votes
5answers
133 views

Trying to add a newline to the paste command

Here is the weak attempt at a paste command trying to include a newline: paste -d -s tmp1 tmp2 \n tmp3 \n tmp4 tmp5 tmp6 > tmp7 Basically I have several lines in each tmp and I want the ...
3
votes
2answers
156 views

Select certain column of of each file, paste to a new file

I have 20 tab delimited files with the same number of rows. I want to select every 4th column of each file, pasted together to a new file. In the end, the new file will have 20 columns with each ...
5
votes
5answers
213 views

Replace data at specific positions in txt file using data from another file

I have a text file in the below format: $data This is the experimental data good data This is good file datafile 1 4324 3673 6.2e+11 7687 67576 2 3565 8768 8760 5780 8778 "This is line ...
1
vote
1answer
81 views

Why is the output of this paste command split on separate lines with indents?

I was trying to merge files using either of these commands: paste data_{1..2}.txt > 1_2.txt paste <(awk '{print $1}' data_2.txt ) <(awk '{print $1}' data_2.txt) > 1_2.txt But the ...
1
vote
2answers
82 views

How to use paste command for many files whose names are not numbers? (paste columns from each file to one file)

To paste many files, whose names are incremental numbers: paste {1..8}| column -s $'\t' -t What if your files wasn't named by number, but only words? It can be up to ten files, what should I do? ...
4
votes
3answers
317 views

UNIX paste columns and insert zero's for all missing values

I would like to merge specific columns from two txt files containing varying number of rows, but same number of columns (as shown below): file1: xyz desc1 12 uvw desc2 55 pqr desc3 ...
1
vote
1answer
43 views

Wierd output using paste with serial option

I have a testA.txt with contents as shown below [jiewmeng@JM textFiles]$ cat testA.txt The quick brown fox jumped over the lazy dog. paste normally works [jiewmeng@JM textFiles]$ paste testA.txt ...
4
votes
3answers
894 views

paste command: setting (multiple) delimiters

In Linux, I have the following problem with paste from (GNU coreutils) 8.13: Trying to set another delimiter than the default (TAB) results in either just printing the first character of the defined ...
0
votes
0answers
131 views

Gnuplot and process-substitution

I have a log file where I need to cut out two values at different positions. these are: time and dQ in my file. The main problem is the paste I think. cause the other utilities work pretty well on ...
1
vote
1answer
124 views

Vim paste string with non-ASCII characters

I am trying to paste a string from a register in VIM which contains non-ASCII characters such as Ctrlr, how can I paste this string into a file, but escape the non-ASCII characters automatically? ...
4
votes
5answers
1k views

A better paste command

I have the following two files ( I padded the lines with dots so every line in a file is the same width and made file1 all caps to make it more clear). contents of file1: ETIAM...... SED........ ...
0
votes
1answer
113 views

vi / vim - extra indents when pasting text? [duplicate]

I can copy characters in other apps such as browsers with ctrlc. I can then press i to enter insert mode in vim and press shiftctrlv to paste the text in. The problem is that each line gets indented ...