tags:

views:

112

answers:

5

I feel that there are a lot of quick uses for scripting languages that you may only think of if you have the shell open at all times. I leave a terminal tab open with python running and have solved many problems with a few lines of code typed off the top of my head. What are some of your less obvious uses for the scripting language of your choice.

A: 
  • Reformat text is some complicated way;
  • Prepare some text based on a template logic;
  • Rename multiple files (e.g. music collection or photos);
  • etc.
zzandy
+1  A: 

I just used a Lua script in SciTE to take a selected SVG path and do some operations on it (find min values and translate to 0, scale, round up values to avoid having a ton of decimal digits). It is just handy.

PhiLho
+1  A: 

Most recently in my Windows centric world I have used it to rename large numbers of files, search/filter log files for a specific occurrence, perform network diagnostics, and a host of smaller things I can't think of at the moment that some of my colleagues not having a UNIX background would never have thought of.

pdavis
A: 

Something very similar was discussed in the Wikibooks article Ad Hoc Data Analysis From The Command Line.

This mostly discusses the use of Unix commands rather than scripting languages, but the principle is the same ... have a shell open at all times.

pavium
A: 

Use BeautifulSoup to clean up some HTML.

Jesse Dhillon