-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash-function
20 lines (14 loc) · 916 Bytes
/
bash-function
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Creates the longnote file
# I put my longnote in my Documents folder; change the path to put it elsewhere
echo "# Longnote" > ~/Documents/longnote.md
# Function will be stored in .bash_profile in the user folder.
# .bashprofile is a hidden file. To see in hidden files in Finder, press Command + Shift + .
# If .bashprofile does not exist, run the following to create it
touch .bash_profile
# Open .bashprofile in a text editor and add the following at the bottom (or by itself if .bash_profile is empty)
# Replace TKTK with the path to the longnote file. You could, instead, use ~Documents/longnote.md, like above, but this is less reliable when you're changing directories
# You can find this path by right-clicking on the longnote.csv file and then holding option and selecting "Copy "longnote.md" as Pathname"
function n() {
now=$(date +"%m/%d/%y, %H:%M") && echo "##" $now "
"$@ >> TKTK/longnote.md;
}