fork download
  1. #!/bin/bash
  2. s="This is a test File of 100 MB Size - 45 of 50 files processed"
  3. exp="This_is_a_test_File_of 100 MB_Size - 45 of 50 files_processed"
  4. sed 's/\([[:alpha:]]\) \([[:alpha:]]\)/\1_\2/g' <<< "$s" | sed 's/\([[:alpha:]]\) \([[:alpha:]]\)/\1_\2/g'
  5.  
  6. sed ':A;s/\([[:alpha:]]\) \([[:alpha:]]\)/\1_\2/;tA' <<< "$s"
Success #stdin #stdout 0s 4392KB
stdin
Standard input is empty
stdout
This_is_a_test_File_of 100 MB_Size - 45 of 50 files_processed
This_is_a_test_File_of 100 MB_Size - 45 of 50 files_processed