title: sed & regex expression
body: <p>I'm trying to add a 'chr' string in the lines where is not there. This operation is necessary only in the lines that have not '##'.
  At first I use grep + sed commands, as following, but I want to run the command overwriting the original file.</p>
  
  <pre><code>grep -v "^#" 5b110660bf55f80059c0ef52.vcf | grep -v 'chr' | sed 's/^/chr/g'
  </code></pre>
  
  <p>So, to run the command in file I write this:</p>
  
  <pre><code>sed -i -E '/^#.*$|^chr.*$/ s/^/chr/' 5b110660bf55f80059c0ef52.vcf
  </code></pre>
  
  <p>This is the content of the vcf file.</p>
  
  <pre><code>##FORMAT=&lt;ID=DP4,Number=4,Type=Integer,Description="#ref plus strand,#ref minus strand, #alt plus strand, #alt minus strand"&gt;
  #CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  24430-0009S21_GM17-12140
  1   955597  95692   G   T   1382    PASS    VARTYPE=1;BGN=0.00134309;ARL=150;DER=53;DEA=55;QR=40;QA=39;PBP=1091;PBM=300;TYPE=SNP;DBXREF=dbSNP:rs115173026,g1000:0.2825,esp5400:0.2755,ExAC:0.2290,clinvar:rs115173026,CLNSIG:2,CLNREVSTAT:mult,CLNSIGLAB:Benign;SGVEP=AGRN|+|NM_198576|1|c.45G&gt;T|p.:(p.Pro15Pro)|synonymous GT:DP:AD:DP4    0/1:125:64,61:50,14,48,13
  chr1    957898  82729935    G   T   1214    off_target  VARTYPE=1;BGN=0.00113362;ARL=149;DER=50;DEA=55;QR=38;QA=40;PBP=245;PBM=978;NVF=0.53;TYPE=SNP;DBXREF=dbSNP:rs2799064,g1000:0.3285;SGVEP=AGRN|+|NM_198576|2|c.463+56G&gt;T|.|intronic    GT:DP:AD:DP4    0/1:98:47,51:9,38,10,41
  </code></pre>