News for hackers. Stuff that matters.
Re:Ask HN: What does your favorite custom shell script do? by eukaryote2 on Friday May 01, 2015 @11:45AM (#9472195)
One I've had for years is bookmarks. It's actually a bash shell function. You can bookmark a file or a directory. $ bma filename $ bma dir

when you type bm, it lists the bookmarks. Select a directory, and it cd's to it. Select a file, and it opens it in vi. Bookmarks can be grouped and sub-grouped and shared with many users on the same linux/unix box.

If enough people are interested, I will publish it somewhere for others to use/adapt/improve.

Re:Ask HN: What does your favorite custom shell script do? by jarboot on Friday May 01, 2015 @04:50PM (#9474431)
I'd love to see this!
Re:Ask HN: What does your favorite custom shell script do? by auganov on Friday May 01, 2015 @01:54PM (#9473258)
A file context menu option in Windows Explorer that calls a batch script that passes names of the file(s) to a bash script that SCPs them onto my server. Another context menu option in WE that opens a new cygwin bash session at the given path. Last one is a bash function "wemacs" that takes a cygwin path/file, translates it to a windows path and opens the path in Windows-native Emacs.

All of them are so trivial but I love them :-D Maybe not so creative tho ;c

Re:Ask HN: What does your favorite custom shell script do? by LarryMade2 on Saturday May 02, 2015 @08:05PM (#9479095)
Just a backup script for Linux - bummed it together with some googling:

Designed for overnight backup, hook up a backup drive in the afternoon one day, and put in safe the next morning.

Script mounts and verifies existence of a backup external hdd; creates a backup tar on the drive; deletes all but the last five recent backup archives; then unmounts drive for removal next morning.

Re:Ask HN: What does your favorite custom shell script do? by blubbers on Friday May 01, 2015 @04:44PM (#9474390)
i wrote a script in bash, then perl that fetches EOD quotes, change ytd, etc etc, and stores them as JSON, then parses them on demand.