fork(2) download
  1. #!/bin/bash
  2. s="home/JOHNSMITH-4991-common-task-list"
  3. sed 's,.*/\([^-]*-[^-]*\).*,\1,' <<< "$s"
  4.  
Success #stdin #stdout 0.01s 5420KB
stdin
Standard input is empty
stdout
JOHNSMITH-4991