Skip to content

Instantly share code, notes, and snippets.

@ndvo
Created June 6, 2019 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndvo/bfe7a39234a7a9c04ceba580175e6e30 to your computer and use it in GitHub Desktop.
Save ndvo/bfe7a39234a7a9c04ceba580175e6e30 to your computer and use it in GitHub Desktop.
Create a text file for a bug using vim
#!/bin/bash
hoje=`date +%Y-%m-%d`
LAST=$(find . -maxdepth 1 -name $hoje-"*.bug" -type f -printf "%p\n" | sed -e s/.\\/$hoje-//g -e s/.bug//g | sort -g | tail -1)
echo $hoje-$(($LAST + 1)).bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment