Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Hi all,
Can anyone tell me Where shell scripting is used ? or say any general scripting language for that matter !!! i am feeling that i am not able find the exact usefulness and necessity of shell scripting.. I just went through one of the Basic shell scripting guides, but i could not get satisfied with myself that where can i use all these things ?
So Please suggest me some practical areas where shell scripting or any scripting is used ? How it is helpful ? and also give me some mini projects on Shell scripting so that i can make use of what i have learnt...
Hi Culin! on this website you will find what you are asking for http://freeos.com/guides/lsst/
Personally I use shell scripting for a couple things, I'm just learning it but it is awesome...
Good luck!
Well, lets see, here are some of the things I wrote bash scripts to do:
* CD/DVD burning script, can burn iso or directory, identifies the type of disk in the drive, checks sizes to see if it fits, burns it.
* generate md5sums of all files in current directory recursively
* install the kernel and check to make sure things are setup properly so it will boot
* record current processes, kill processes that are not in the record
* fixes all names in current directory to be lower case and without spaces
* set system time in a more friendly way
* wrapper for rm to prevent deleting of top level directories and 1 level down
* package management (obsoleted)
But, I use shell scripting more than for just making scripts, it comes in handy when I need to automate things like downloads, renames, etc.
Last edited by H_TeXMeX_H; 11-05-2008 at 12:22 PM.
A couple of random ideas for things I've done in the past that you might find interesting and/or challenging.
An universal command line unpacker, which doesn't care about the type of archive. It parses the file and uses the correct program to extract it.
A script to find .lnk windows files under a given dir, and convert then to linux symlinks.
Besides that, I use bash scripting intensively in my daily work when handling batch operations from command line. I use test cases and loops intensively every five minutes to do one thing or another.
I installed Cygwin/X at work so I could use bash and the coreutils. For highly repetitive things, you can be do things easily in the shell that would be too difficult in the GUI. I make catalogs of backup DVDs from the ls -l listings and using cat, sort, cut, sed, enscript and ps2pdf, produce pdf catalogs. Using just a handful of handy utilities, piped together produces something I can't in the GUI. I also need to take a list of spots to delete, find which ones are in a device's inventory and delete them. Doing this graphically would take much too long using the "file manager" for these devices. Extracting the spots to delete from an inventory list (of thousands) is much easier done in the shell. There are 15-25 devices per site, and the web based tool we have that should do it automatically doesn't work.
If you need to do perform an operation on certain files that are contained in several directories and subdirectories, the graphical selection process (Object-Action) becomes too difficult or impossible.
Sometimes using the GUI makes more sense. I wouldn't want to try removing red-eye from a photo in the shell. Putting a watermark on a photo using the Gimp is easier to do then using one of the ImageMagick programs. But if you want to do the same for hundreds of pictures, automating the process in a script would be easier.
wooow.. thanks for all replies.. and sorry for the late reply...i was out of station..
yes surely i will also do some mini projects on shell scripting and then will post back for queries and problems...
Shell scripting is a programming language.
Programming languages are used to write computer applications---ie code that does something useful (to someone).
So maybe the question is "Why would anyone need computer applications?" (There are times where I really wonder......)
Shell scripting is a programming language.
Programming languages are used to write computer applications---ie code that does something useful (to someone).
So maybe the question is "Why would anyone need computer applications?" (There are times where I really wonder......)
To be able to copypaste homework from wikis and Encarta
Another issue is that the playstation doesn't do all that alt+tab magic, that is so necessary when parents or bosses are around, with all the games and porn and stuff.
Besides jokes, what the OP should ask to himself is if he has a problem to solve. Programming languages are created to program applications that solve a given problem. If you haven't got any problem so solve, then trying to solve "it" has no sense. And that's the impression I got from this thread.
Another issue is that the playstation doesn't do all that alt+tab magic, that is so necessary when parents or bosses are around, with all the games and porn and stuff.
That's why you have 2 workspaces one labeled "work" and one labeled "play" and a hotkey to switch between
Hi all,
Can anyone tell me Where shell scripting is used ? or say any general scripting language for that matter !!! i am feeling that i am not able find the exact usefulness and necessity of shell scripting.. I just went through one of the Basic shell scripting guides, but i could not get satisfied with myself that where can i use all these things ?
So Please suggest me some practical areas where shell scripting or any scripting is used ? How it is helpful ? and also give me some mini projects on Shell scripting so that i can make use of what i have learnt...
Thanks and Regards
Naren.
Simply put in the Administrators world: Scripting is used when you'll be doing the same task more than once. If you have to do it again, script it to automate your work.
Learn to be a lazy administrator and always do your tasks once while letting you're scripts do the rest of your work. Automation with scripts gives you more time to surf the net and look at others emails.
That's why you have 2 workspaces one labeled "work" and one labeled "play" and a hotkey to switch between
Yup. I am a big fan of worspaces. I am an xmonad user which is amazing at managing them, including full xinerama support, which 99% of the wm's around lack (even if they claim to have such support).
I just mentioned alt+tab because it seems to be more famous
I recently created a script with a list of all kinds of music I have on my pc so it asks me what kind of music I would like to listen to? Of course there is a given list which I select the type let's say ROCK or OLDIES, etc and AMAROK will load my music! back then when I used W$ndows I had to go to each folder and right click the mouse to select all files then select the play option and if my machine didn't froze I will be listening to my favorite songs in a couple minutes! if not a necessary re-start would be required!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.