Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Right.

I'll often use touch just that way, in part because I can also apply standard features / functions in the process, particularly a datestamp:

  touch <mnemonic-$(datestamp)>
Where datestamp is a bash function:

  datestamp () { date +%Y%m%d; }
In several scripts / tools, the title (and other metadata) are automatically generated and added, with sanity checks for characters, casing (lowercase preferred), and tokenisation (usually '-' between words, '_' between elements, and '--' between repeated elements, e.g., multiple authors. The results can be longish, but descriptive, filenames. With a low collision probability.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: