Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 52727

Use this tag when describing a specific portion of a particular group of entries in a table or a matrix or any other structured data set which is vertically aligned.

3
votes
Use paste: paste -d"\t" file1 file2 Where: -d specifies the dlimiter between the two files (\t is a tabulator). file1 contains the lines you want to prepend. file2 contains the other lines. Edi …
answered Sep 11 '15 by chaos
1
vote
while read -a line; do echo -e "${line[1]}"; done < file 34 45 56 29 where file contains your list.
answered Dec 10 '13 by chaos
3
votes
With awk: awk 'NR==1{$2=$2"1 "$2"2"} NR!=1{split($2,a,""); $2=a[1]" "a[2];}1' file NR==1 applies only for the first line $2=...: reformat the second field as header with allele1 allele2 NR!=1 a …
answered Oct 7 '15 by chaos
4
votes
With awk: awk '{for(i=1;i<=NF;i++){for(j=i+1;j<=NF;j++){print $i$j;}}}' file It's two nested for loops: for(i=1;i<=NF;i++) loop trough all fields for(j=i+1;j<=NF;j++) then for each field, loop …
answered Apr 8 '16 by chaos
2
votes
An awk solution: awk -F'[,-]' '{printf "%s,%s,%s,%s/%s/%s,%s\n", $1, $2, $3, $6, $5, $4, $7}' file Explanation: -F'[,-]: set the delimiter to , or - '{printf "%s,%s,%s,%s/%s/%s,%s\n", $1, $2, $3, …
answered Aug 13 '14 by chaos
16
votes
temp final.res; done; rm temp It calls paste for each file once, and at the end there is a huge file with all columns (it takes its minute). Edit: Useless use of cat... Not! As mentioned in the …
answered May 26 '15 by chaos
3
votes
Use join: join -j 1 -a 1 <(sort file1) <(sort file2) -j 1: the join field is the first one -a 1: print unpairable lines from file 1 sort: the files must be sorted for join
answered Aug 12 '15 by chaos