fork download
  1. #!/bin/bash
  2. s="1.mapped.bam 2.mapped.bam 3.mapped.bam"
  3. sed -E 's/([0-9]+)\.mapped\.bam/SAMPLE_\1/g' <<< "$s"
  4. sed 's/\([0-9][0-9]*\)\.mapped\.bam/SAMPLE_\1/g' <<< "$s"
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
SAMPLE_1	SAMPLE_2	SAMPLE_3
SAMPLE_1	SAMPLE_2	SAMPLE_3