TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What does your favorite custom shell script do?

7 点作者 mikemajzoub大约 10 年前
While we may talk often about other pieces of the software development lifecycle, shell scripts don't usually get to take center stage. Let's share some creative little scripts we've come up with over the years!

4 条评论

eukaryote2大约 10 年前
One I&#x27;ve had for years is bookmarks. It&#x27;s actually a bash shell function. You can bookmark a file or a directory. $ bma filename $ bma dir<p>when you type bm, it lists the bookmarks. Select a directory, and it cd&#x27;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&#x2F;unix box.<p>If enough people are interested, I will publish it somewhere for others to use&#x2F;adapt&#x2F;improve.
评论 #9474431 未加载
auganov大约 10 年前
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 &quot;wemacs&quot; that takes a cygwin path&#x2F;file, translates it to a windows path and opens the path in Windows-native Emacs.<p>All of them are so trivial but I love them :-D Maybe not so creative tho ;c
LarryMade2大约 10 年前
Just a backup script for Linux - bummed it together with some googling:<p>Designed for overnight backup, hook up a backup drive in the afternoon one day, and put in safe the next morning.<p>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.
blubbers大约 10 年前
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.