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.
Well...not really. Is there any need to create "another" ls?
If you want to learn about Linux shell scripting using Bash I suggest you download the Advanced Bash Scripting Guide. It is an excellent resource and I always keep a copy handy.
Parameters passed to bash scripts can be used as $1 (for the first parameter), $2 and so on, or $* for all the parameters. $0 refers to the script itself.
I meant that I need to write a program that will be utility as ls is.
So , I just wanted to know how utilities are writed. should I do it by script or should it involved make file etc'?
hi,
you can write simple to very sophisticated scripts. it depends on your expertise of particular language. and you can run both scripts and c programms (compiled) from command line. for more help on bash scripting read the above recommend (by hw-tph) documentation.
Many shell utilities are themselves written in shell. There is no rule. If I remember correctly, the "time" utility is written in perl or python, I don't remember. And as said, many are in C.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.