LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-12-2013, 04:56 PM   #1
monojeffrey
Member
 
Registered: May 2012
Posts: 85
Blog Entries: 1

Rep: Reputation: Disabled
Creating a C program in redhat


Hi

kindly guide on this two concepts

What is a scrpit?(linux)
what is a program? ( C program)

both do automation(repetitive tasks, calculations)

how to create a C program in redhat
is it possible to place the c program as start up script?

heard like kernel of unix is written in C language(Dennis ritchie)

does all the nis,nfs and all other software distributions are written in the same manner as a C program

Last edited by monojeffrey; 02-12-2013 at 04:56 PM. Reason: spelling mistake
 
Old 02-12-2013, 05:23 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Monojeffrey,


I appreciate that you are trying to learn how these things work but I think you should try to focus your learning a bit so you don't get overwhelmed and feel like you are all over the place.

The term "script" can be misconstrued easily, some people will use this term to refer to a compiled C program or to a basic for loop they wrote. It is kind of up your interpretation, it does not relate to a specific language or operating system. A .bat file on Windows could be considered a script.

C is a programming language, and yes most of the Linux kernel was wrote in C and the C programming language is a huge foundation for a lot of other programming languages and applications.

Now lets ask the first question.

Would you like to start by learning how to programming works and then learn how the Linux OS works?

or

Would you like to start by playing with the Linux operating system and learn programming later?


I would recommend you learn the basics of the OS, what BASH is and how to do the basics with it then you can start opening the programming can of worms.

Try www.linuxcommand.org/tlcl.php to start learning the OS. It will give you some BASH scripting exposure which will translate into C programming a lot easier.
 
2 members found this post helpful.
Old 02-12-2013, 08:02 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You should see this tutorial http://rute.2038bug.com/index.html.gz
 
1 members found this post helpful.
Old 02-13-2013, 01:40 AM   #4
bloodstreetboy
Member
 
Registered: May 2012
Posts: 201
Blog Entries: 3

Rep: Reputation: 37
Write any C program in text editor and save as filename.c
To run this program, you have to compile it first.

Code:
$ gcc -o anyname /path/of/your/c_program_file/filename.c
This will generate a compile copy of your program.
Now create output copy of your program.Following command generate a output file of your program in same directory.
Code:
$ gcc /path/of/your/c_program_file/filename.c
Now run your program.
$ ./a.out
or
$./anyname

where a.out is output copy of your program. Alternatively you can run compile copy of your program.
 
1 members found this post helpful.
Old 02-13-2013, 01:46 PM   #5
monojeffrey
Member
 
Registered: May 2012
Posts: 85

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Kustom42

i would like to learn only how the linux OS works, since already has some exposure to programming

thanks for the kindly replies and advices
 
  


Reply

Tags
programming, redhat



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Program for creating diagrams ThirtySixBelow Linux - Software 1 01-05-2010 01:31 PM
Creating a Perl Program with options HyperTrey Programming 15 12-18-2008 08:29 PM
Creating desktop link to java program patricktyler Fedora 3 02-03-2006 05:26 AM
creating an e-mail program hyperriven Programming 2 06-30-2004 02:58 AM
Creating Desktop Program Icon ss109 Linux - General 4 03-15-2002 11:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration