Skip to content

Instantly share code, notes, and snippets.

@musab
Last active May 9, 2023 01:30
Show Gist options
  • Save musab/84a7d2968568cfdb752ac6e466b298e8 to your computer and use it in GitHub Desktop.
Save musab/84a7d2968568cfdb752ac6e466b298e8 to your computer and use it in GitHub Desktop.
bash script to quickly create a new new
create_note() {
# Get the current date in the format YYYY-MM-DD
local date=$(date +%Y-%m-%d)
# Generate the file path
local filepath="/Documents/notes/${date}-${1}.md"
# Create the file
touch "$filepath"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment