Last active
August 2, 2018 22:26
-
-
Save MilesDowe/097e2f9832c89a4a763697576ea6d9ed to your computer and use it in GitHub Desktop.
RC function for creating work ticket notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to .bashrc or similar runcommand file | |
function ticket() { | |
FILE=${1}.txt | |
FILE_LOC=~/Desktop/${1}.txt | |
# Check if file exists | |
stat ${FILE_LOC} > /dev/null 2>&1 | |
EXISTS=$? | |
# If not, add header | |
if [[ EXISTS -ne 0 ]]; then | |
echo "# Ticket ${1} Notes" >> ${FILE_LOC} | |
echo "Created: $(date)" >> ${FILE_LOC} | |
echo "Author : Miles Dowe" >> ${FILE_LOC} | |
echo "Sprint : ####.##.##" >> ${FILE_LOC} | |
echo "" >> ${FILE_LOC} | |
echo "## Development Steps" >> ${FILE_LOC} | |
echo "" >> ${FILE_LOC} | |
echo "## Questions & Concerns" >> ${FILE_LOC} | |
echo "" >> ${FILE_LOC} | |
fi | |
vi ${FILE_LOC} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment