Skip to content

Instantly share code, notes, and snippets.

@crotel
Last active October 16, 2020 09:56
Show Gist options
  • Save crotel/b8e6ba28fcae74311c7c5f59836648f3 to your computer and use it in GitHub Desktop.
Save crotel/b8e6ba28fcae74311c7c5f59836648f3 to your computer and use it in GitHub Desktop.
Create test js with 'date + time' stamp name-rule in shell
$ echo "alias njs='stamp=$(date +"%F_%H%M%S") && vim "$stamp".js';" >> ~/.bashrc
$ echo "alias llnjs="ls -1 | egrep -e '[[:digit:]]{1,4}\-[[:digit:]]{1,2}\-[[:digit:]]{1,2}\_'";" >> ~/.bashrc
$ source ~/.bashrc
/*
## Create
$ njs
## Listing
$ llnjs
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment