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.
Is there some reason to guess this thread is anything other than a "do my homework for me" request?
Assuming the thread is homework, hopefully those who know the answer will limit their responses to specific detail answers in response to more specific follow up questions from the OP (don't show off your C knowledge by posting the whole answer).
C is a general purpose language. That includes scripting.
There are functions available to run another program, providing command line arguments and stdin to that program while capturing the exit code, stdout and stderr from that program. That plus some ordinary programming capabilities makes a scripting language. (I'm not making any comment there on whether it is a convenient scripting language).
Quote:
Please give some context for the question and confirm if it is homework.
A clearer problem statement would also help. I think Dave (ilikejam) misunderstood the problem statement (the required operation of the "script". I don't just mean that Dave intentionally ignored the specified language choice). Of course, if it is homework the OP probably can't give a clearer problem statement than the instructor gave to him.
C is a general purpose language. That includes scripting.
There are functions available to run another program, providing command line arguments and stdin to that program while capturing the exit code, stdout and stderr from that program. That plus some ordinary programming capabilities makes a scripting language. (I'm not making any comment there on whether it is a convenient scripting language).
I believe he meant that it is a compiled language. It is not a scripting language that you can use in an interpreter.
You can also put in wood screws with a sledgehammer, but noone would look at a sledgehammer and call it a screwdriver......
I think a better viewpoint (and one of my favorite sayings) is:
There is a correct tool for every job, but I can't find it so I'm using a vise grip.
I have, in fact, used a vise grip to put in wood screws (it does a much better job than a sledgehammer) as well as take out a wider variety of screws, cut things, take corks out of wine bottles, etc.
C or C++ can fill that role very well in software engineering.
But in this thread, I was just trying to allow for the possibility that the OP's hypothetical instructor had given a reasonable assignment (do something in C as part of learning C, that might be better done some other way, but teaching something you ought to learn when learning C).
C is not a scripting language....Please give some context for the question and confirm if it is homework.
It isnt a scripting language but it could be run as script. This is a prank I am doing to my co-workers from the IT department I work at. I want to send them an automated "scary message" every friday the 13th so that I dont have to manually write it every such day. got 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.