Skip to content

Instantly share code, notes, and snippets.

@b3ll
Created September 22, 2023 16:19
Show Gist options
  • Select an option

  • Save b3ll/1d594148739530fb9b4abe5ed2f5540f to your computer and use it in GitHub Desktop.

Select an option

Save b3ll/1d594148739530fb9b4abe5ed2f5540f to your computer and use it in GitHub Desktop.

Revisions

  1. Adam Bell created this gist Sep 22, 2023.
    5 changes: 5 additions & 0 deletions titlecased-commit-msg.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #!/bin/bash
    INPUT_FILE=$1
    START_LINE=`head -n1 $INPUT_FILE`
    FIXED_TITLE=`echo $START_LINE | titlecase`
    sed -i '' "1s/$START_LINE/$FIXED_TITLE/" $INPUT_FILE