Help me think of "bash script" which will do a few operations
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Help me think of "bash script" which will do a few operations
Help me think of "bash script" which will do a few operations. Need to write directly to that this "bash script" will do (no title) The more operations the better. Thanks in advance!
"Excuse me for does not literacy"
You will need to be a bit more specific on the types of "operations" you want to perform with the bash script. A bash script can be made to do anything from a simple keyboard game to a system maintenance script. There are so many things it can do that without you specifying what it is you want to do, nobody can help you. Please, tell us more about what you want to do, like move files, copy stuff, etc.
I need to write a "bash script", which will need to write until June, and I need to invent what this script will do. I understand that it can do all, but the problem is that I do not understand for scripts. I will study this in the future. A theme to choose now. So please help think of some operations that this script will do. 2-3 may be more action. Thank you!
If what you mean is that you need to write a script by June, and you need help thinking of what the script should do, then I can give you a few ideas. If you want to go simple, then a simple backup script is easy and useful. You can add smaller features like timers, selective backup, compression, etc. to meet the complexity requirement.
Scripting is essentially the art of scratching the itch. You find something you need or want to do that would be repetitive and tedious to do by hand, and write a script to automate it.
Over the years I've written many scripts. Most of them have been one-shots written to handle a particular issue, and discarded when done, but there are also more generally useful ones that I've kept around. Some examples...
A pair of scripts that copy the filenames and metadata from from one series of audio files to another, when I wanted to replace some old mp3 albums with better ogg vorbis copies.
Other scripts to batch-convert flac files to ogg, apply replay gain, remove unwanted meta-tags from them, and generate simple playlists. I'm now slowly working on creating a large one-stop rip/convert/edit script that will unify everything.
Scripts to download sequences of comics from webcomics I like, format the filenames, and store them in a directory structure of my choosing.
A script that provides a more interactive and functional rmdir. It checks for the existence of sub-files, lists them out if desired, and lets me decide what to do.
A function to control the output of ls (files only, dirs only, long format, etc.), which I use in conjunction with various aliases.
A function for setting the IFS variable in my shell to various preset values.
A script to clean up the formatting of html files and remove unwanted tags (to make other scripting easier).
A one-step checksum comparison script.
Scripts to colorize and de-colorize text output.
Scripts for renaming files (in particular, one that zero-pads numbers in filenames).
Scripts to enable and disable, or execute in specific ways, various programs/services/features on my system that I use only occasionally (often launched through a gui hotkey or icon).
A function for editing scripts (it launches my editor with a basic script template pre-loaded and automatically chmods it.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.