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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

What problem did your first script solve?

2 点作者 mariusbutuc超过 12 年前
Today I wrote my first (trivial, but "real") bash script... 10 years after studying linux scripting in university: https://gist.github.com/3714934<p>Do you remember what was the first problem you scripted your way out of or how long after you learnt your first scripting language?

2 条评论

unimpressive超过 12 年前
I don't remember my first script. Though I <i>do</i> remember the most value I've ever gotten out of a script.<p>To set the scene, I had a high school science class, and in it you were supposed to do journal entries. (Read: Notes.) You kept track of all your notes and put them in a table of contents. The instructor kept all the notes on his website. It was the night before the last day of school. Or the night before that. I hadn't turned in my organized notes, and thus had a C in the class. I needed them turned in yesterday.<p>So what I did was:<p>1. Download the powerpoint of all the notes.<p>2. Use libreoffice to convert it to pdf.<p>3. Used less to read the data from the pdf into text.<p>4. Used sed to remove the garbage characters from the text.<p>5. The file had uniform formatting, so I went over it with sed again to turn it into an HTML file.<p>6. Went over the HTML file by hand to correct anomalies and fill in answers to questions. (This was the 'real' assignment, fill in various questions throughout the notes.)<p>7. Wrote out an table of contents. (Which in retrospect could have been done with a sed script.)<p>8. Turned the whole thing in.<p>He never actually read it (As it was quite apparent from a glance that I had done it.), but I got an A in the class; and a night of no sleep.
dariot超过 12 年前
It was a script for invoking a C program stored in all of the machines forming a cluster of 16: the whole point of the thing was to generate traffic between the PCs in a structured fashion, measuring the bandwidth and latency results.