What is the coolest script you've made ? Any scripting language.
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What is the coolest script you've made ? Any scripting language.
You don't have to post the script, but at least say what it does. You can post more than one.
Probably the coolest one I've made is a script to download from MU using the premium account I bought. It's cool because they don't provide Linux programs or support, yet I can still do everything with a simple script. I just list the download links in a text file and it downloads them automatically while I'm away, one by one. I made one with parallel downloads that downloads faster, but there is a chance of connection timeout for some reason, so I don't use it.
If you want I guess I can post the script, but I have to censor it because it contains my login info, but it's only 22 lines long.
The second coolest script is the burnit script, not as advanced as other burning scripts like bashburn, but it does exactly what I need and has never burned a coaster. It's on my site if you want it. Oh, and there's also the slackware update script I made, because slackupdate didn't work for 64-bit.
I dont have a copy of the script to post, but I wrote a bash script to download New Episodes of specified TV shows from a tivo series 3. It also decrypted the files, and encoded them to smaller xvid... the only thing I didn't like about it was commercials were kept.
A couple of weeks ago I wrote a script to automate my LFS build. It extracts all the commands from the XML file and puts the commands necessary to build a package in their own dedicated script. Afterwards you can run the script and save yourself some tedious typing.
I know, there are already scripts to automate an LFS build. However, it was a nice exercise.
No way near to you guys. Use scripting for certain daily routine tasks and all. Like backing up bugzilla database daily and some other small backup scripts and like. Nothing cool about them but they work. Most of them are in bash. Another that I wrote some time ago was a Perl script to open the squid log file, read and then analyse the logs and then create an html page from the data so that I could analyse it the time I need. it also calculated the number of hits to cache and those that had no cache hits and got the results from internet and calculated the amount of data downloaded and all. It was not cool. Just crude but it worked fine for me like I wanted. gave all the information I wanted in a single html page. And then I could keep as many html pages I wanted for future references as well. I dont know if I still the script or not. I do not use it any more. I am using sarg but I think my script was custom made so worked for me better.
I made a script once that would go through a directory of pictures, finding similar (resized or resampled) pics and renaming them to a similar filename. Allowing for easier deletion and sorting.
Good for going through and finding doubles of pictures -- that are nearly the same, but differently sized, or cropped, or filtered.
I just wrote a script to convert other multimedia files to .avi with xvid and mp3. I will probably post it on my site soon. It's not as extensive as other scripts /programs for this purpose, but this is the way I encode these.
I have written scripts in different languages, but do not frequently use them. One was a portable shell script to download files in batch. I scheduled it from cron. It took input from a text file with one URI per line, with actions logged to another file. It would fetch a URI, retrying the download a number of times to deal with lost connections. After the download completed, it would remove the URI from the text file and move on to the next URI. It would repeat this loop until a certain time of day, or until all downloads completed.
Combined with demand-dialing, this made shared dial-up more bearable. I could stick a URI to a Linux .iso image in the queue. The download script would start around 10 P.M. and run until 4 A.M., so it would not interfere with our Internet usage during the day. It would take days to download an .iso image, but each night the download would resume where it left off the prior night.
It also helped when I wanted to download many audio files. I would just add the URIs to the list and let the script run. I added an option to throttle the speed so that it could be used during the day if desired. The script began on a LFS system with the snarf [1] command, then later on Debian with the wget command, and then on NetBSD with the ftp command.
I wrote several bash scripts to help me organize a music library. My favorite accomplishment is one that will uppercase the first letters of the title in an mp3 id3 tag of all in a directory. Makes me squirm to see a music title show up on a player in all lowercase. I've fixed some of my friends libraries with these types of small scripts and they are real time savers. One library I fixed was 117gb. This guy has a TON of cds. It was fun.
@H_TeXMeX_H: please define "cool" in this context. I've written some fairly noddy scripts that get a lot of usage and some big (sets of) scripts that are behemoth examples of anally-retentive error trapping, logging and debug facilities -- maybe good practice but hardly "cool" in the usual sense.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.