LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-29-2005, 07:45 PM   #1
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Rep: Reputation: 15
To Script or Not to Script


Hello
I usually do my coding in C and rarely C++
I also know some Jave and made a program or two in Perl but I still prefer C to any of them
The question is Shall I learn a scripting language some day, or C is enough.
And if yes that what is the best to learn.
I know that there is no specific answers for "What is the best" questions.
But at least I want to get your opinions and recommendations if any.
Thanks pals.
 
Old 01-29-2005, 08:01 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Same here. I like C, and also know some C++, Java and PHP.
I'm getting into python little by little. I think it's worth learning python as well.
Or perl, but I decided to do python.
And, if you don't know it already, some shell scripting (bash comes to mind) can be very useful.
 
Old 01-29-2005, 08:12 PM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I'm going to be learning Python soon. I've worked with PERL before, though it is very rusty. I'd suggest you at least learn the basics of BASH scripting, or whatever your shell of choice is.
 
Old 01-30-2005, 02:39 AM   #4
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Original Poster
Rep: Reputation: 15
What I hate about Perl is that it is you know spaghetty programming. Not clean as C or even Java.
 
Old 01-30-2005, 07:03 PM   #5
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
FYI: Perl is not spaghetti programming; that's down to the programmer. You can write unreadable stuff in any lang... you should see some of the 'C' code I've had to deal with
 
Old 01-31-2005, 07:34 AM   #6
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Original Poster
Rep: Reputation: 15
Ummm,
So what do you recommend to learn. I dun care if it is easy or hard to learn. But i want a clean and powerful scripting language to use.
BTW, what's the pros for scripts to copiled programs (C for example).
I can say portability, but what else ??

Last edited by gr33ndata; 01-31-2005 at 07:35 AM.
 
Old 01-31-2005, 08:25 AM   #7
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Although bash scripting has its limitations (few, IMO), I find it is VERY handy to know it.

Yves.
 
Old 01-31-2005, 09:25 AM   #8
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Yes scripting plays very important role in coding. You can use them to directly call from code do job that need 1000 line code in C/C++ and it works. I find python and Bash very useful and use them extensively them in C++, some time in QT.
 
Old 01-31-2005, 09:25 PM   #9
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
In terms of programming speed, languages such as Perl take care of the fiddly bits like not writing off the end of an array/string in C.
Basically, it's at a slightly higher level, although you can do bit-twiddling if you want.
You usually get to the runnable stage quicker.
Perl is actually "compiled" in memory, then run so it's pretty quick.
(Technically it's an excutable env, rather than a standalone exe. Standalones can be generated, but most people don't bother.)
 
Old 02-25-2005, 05:42 PM   #10
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Original Poster
Rep: Reputation: 15
Sounds like endless war between different scripting languages fans. No way to decide which is the best one.
 
Old 02-27-2005, 06:59 PM   #11
farmerjoe
Member
 
Registered: Oct 2004
Location: Texas
Distribution: Ubuntu - Home, RHEL4 - Server
Posts: 96

Rep: Reputation: 15
Bash with a mixture of perl is IMO by far the ultimate combination when it comes to scripting. I am not the best programmer myself (hardly as you can see from some of my previous posts), but i try and learn a lot. My friends, however, are very proficient in these and i have seen some amazing stuff come out of a fairly complicated bash script.

-farmerjoe
 
Old 02-28-2005, 02:33 AM   #12
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Original Poster
Rep: Reputation: 15
Good, I did some perl scripts before but couldn't get used to it. Any ways I think I'll try to learn some bash scripting.
 
  


Reply



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
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM
creating shell script that executes as root regardless of who runs the script? m3kgt Linux - General 13 06-04-2004 10:23 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:20 PM.

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