Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

suneun

macrumors member
Original poster
Feb 5, 2002
80
0
I was hoping that there are some of you who are unix'y and write shell scripts for fun. Does anyone want to share interesting/useful shell scripts they've come across? I'm an avid terminal user, especially since I have an account on a community server ( http://www.techhouse.org ).

I would suggest that if they're short, you could post the code here. Else, you could post it on your own webpage and mention the link.

Here's one I didn't write, which is actually a perl script I love using. It takes the command "webster word" and fetches back definitions.
http://www.techhouse.org/~clara/webster
 
Okay, here's one I use to determine how far folding@home is.

I call it sl.csh (sl for show log). It resides in the folder with the main fah application. The output looks like:

- Frames Completed: 45, Remaining: 55
Finished a frame (46)
Finished a frame (47)
-rw-r--r-- 1 bousozok staff 630928 Jul 27 00:52 wudata_03.arc

Here's the code:

# show the logfile contents
cd ../Library/Folding@home/work/
foreach file (logfile_??.txt)
grep "[Ff]rame" $file
end
# also list the file .arc file for time
ls -l *.arc
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.