The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
question about testing in shell programming thungmail Shell Programming and Scripting 6 04-09-2008 11:04 AM
question about testing in shell programming thungmail Shell Programming and Scripting 2 04-07-2008 11:29 PM
question about testing in shell programming thungmail Shell Programming and Scripting 3 04-05-2008 07:29 AM
question about testing in shell programming thungmail Shell Programming and Scripting 3 04-02-2008 07:46 PM
question about about Shell programming thungmail Shell Programming and Scripting 1 04-01-2008 10:40 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-22-2002
Registered User
 

Join Date: Mar 2002
Posts: 12
Question about Shell Programming

First, I'd like to know if being a shell programmer considered a "real" programmer. is it??


also, I do create a lot of shell programs which includes full scripts to create users and maintaining records. ie phone records.

now, I hear the programmer has to do some cleaning up after the program he/she created finish running. I dont understand this part. what does that mean??? are there any relevant cleaning up I need to know about???

Please, any share any information you might have about this topic.

thanks
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-22-2002
rwb1959's Avatar
Registered User
 

Join Date: Aug 2001
Location: Virginia, USA
Posts: 438
It has been my experience, that true "shell programming"
is in fact "programming". I have seen, used and even written
some very complex and highly functional shell programs.

There are some however that do feel this is NOT "real"
programming. I would venture to say that these folks
either have never written anything in a "shell language"
or have simply just "dabled" in small scripts from time to time.

So I guess it's all a matter of opinion and degree

As far as cleanup goes, most often this refers to the use
of temporary files and such when writing shell programs.
In which case, you should "clean up" after using them meaning,
remove them. In the case of other programming languages it
may also apply to closing network and/or DB connections and
such.
Reply With Quote
  #3 (permalink)  
Old 03-25-2002
Registered User
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
The question of what is 'programming' or not is actually quite interesting.
The autors of Beta (www.mjolner.com - look for Beta, Solaris or Linux version) say that everything relating to system development is programming, including drawing up UML diagrams, doing object analysis, even requirements alalysis.
This is why their Mjølner system can be programmed using UML diagrams (the object analysis part,anyway). If shell programming is not programming, then what is?
The only difference between a shell script and a binary is in the way it is being executed - completely transparent to both programmer and user.
If interpreted programs were not 'real' programs, then what to say about Java? Java programs are interpreted /and/ compiled!
In fact, there is nothing that stops you from writing a compiler for you shell script and running it as a binary ... or running a C-program in an interpreter.
I know what this is about: What is the most macho programming one can do?
Answer: cat > prg.
Then enter the ASCII codes that correspond to the CPU instructions you want executed, if one of them is 0x4 then you can not continue, MOV store to accumulator on a 16-bit ISA PC system, fx. is in binary 1010000wLLLLHHHH, you fill in the operands, look up the corresponding ASCII characters, and write them into the file after the ELF header and stuff. That way, you can run 'arbitrary code' on a Linux system with only cat and write permissions as your tools. You don't get more macho than that, but is it 'programming'?
Sure!
Is it 'serious programming' - no way!
__________________
PS
All of the above is to be read as '... unless I am wrong'
ENDPS
Reply With Quote
  #4 (permalink)  
Old 03-26-2002
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Cleaning up, in many cases that I've seen in shell scripting, means removing any temp files, unsetting any variables that may make it into a shell session (doesn't happen all that often - most scripts are run as a child process, as opposed to "sourced", or run as a string of commands in the current process), and handling signals properly (if the job runs as a daemon, does it ignore the SIGHUP signal correctly? What does the script do when it hits an error, or something it doesn't know how to deal with?).
Any other things to watch out for, anyone?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0