Sponsored Content
Top Forums Shell Programming and Scripting Check lists for Unix Shell Programming Post 80408 by srikanth_ksv on Monday 8th of August 2005 06:40:22 AM
Old 08-08-2005
Coding Standards

Here are few things I came up with :
Please suggest any changes that you feel necessary :

1. Header
Each Shell script file will use this Header template at the top of the file.

#######################< Shell Script>###############
# Owner:
# Application:
#
# Date: DD-MON-YYYY
# File Name:
# Author:
# @(#) Description:
# Parms:
# Called By:
# Output:
#
# Modification History:
#
# Change Date Name Description
# ----------------------------------------------
#
##################################################

2. Commenting

1. Lines can be commented with a # (hash)

2. Make comments distinguishable from the code.

3. Make sure comments and the code match.

4. Never comment out a portion of the code without a comment describing why, who and when. If the need for the commented out code has expired, remove the commented out portion.

5. Comments should be indented to the level of the code they describe.

3. Modification Log
Whenever a code is modified make sure that there is a modification log.

A modification log is one which has the details of what has been modified, by whom and when. Include this detail along with the header.

4. Naming

1. All the constants and environment variable names should be in Capital letters.
2. All script variables must be lower case.
3. All the variable names should be meaningful.
4. All the function names should be related with the functionality of the code.
5. Don't name the variable in single character (such as i,j,a), it will be tough to search the single character for code changes.
6. Don't keep the keywords as variable or function names.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check any MQ is up or down using shell programming

Hi, I want to know that if there are any methods, which check the MQ, is up or down. Actually I have to write one job which checks the status of any one MQ is up or down. I don't know if there is any method of MQ, which tells the MQ, is up. Could u please give some link for the study... (1 Reply)
Discussion started by: rinku
1 Replies

2. Shell Programming and Scripting

shell programming in unix

Hi, Iam using split command to split the files. Splitted files will be named as xaa xab xac xad etc. Directories will be test1,test2,test3..... Now i want to select the splitted files one by one and have to place in test directories. can anybody give the soulution??? (2 Replies)
Discussion started by: nivas
2 Replies

3. Shell Programming and Scripting

Shell Programming in unix

Hi, i want to read a full file. If i want to split the file and by reading parralel each, i can save the time. Can any body give me the suggesion?? ia m using this function to read a file and using that i have to grep in another file. since the file 1 is huge it is taking lot of time. ... (3 Replies)
Discussion started by: nivas
3 Replies

4. Shell Programming and Scripting

UNIX Shell Scripting / Programming

Hi, I am looking for a PDF or an e-book which can show in details how to do Shell Scripting or Programming. Can anybody provide me with a link to such a tutorial? I have downloaded some tutorials but they show only basics and not give any in-depth study material. I am using Red Hat Linux... (2 Replies)
Discussion started by: indiansoil
2 Replies

5. Programming

C++ programming using lists

To test this program it must create 2 integer lists - list1, list2 - and then read and process a series of list commands from a file named "data.txt". Each command and any associated values, list number, value appears on a separate line. All I can do is get it to input the integers and then... (3 Replies)
Discussion started by: tiger13e
3 Replies

6. Shell Programming and Scripting

Shell Script to Create non-duplicate lists from two lists

File_A contains Strings: a b c d File_B contains Strings: a c z Need to have script written in either sh or ksh. Derive resultant files (File_New_A and File_New_B) from lists File_A and File_B where string elements in File_New_A and File_New_B are listed below. Resultant... (7 Replies)
Discussion started by: mlv_99
7 Replies

7. UNIX for Dummies Questions & Answers

How does unix system administration, unix programming, unix network programming differ?

How does unix system administration, unix programming, unix network programming differ? Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

8. Shell Programming and Scripting

UNIX shell programming

Hi guys i have two different line input M5.7&a : M5 minimum density is 20%, maximum density is 80%, DENSITY PERM=M5.8&a(180) ......... 6 violations found. M6.7&a : M6 minimum density is 20%, maximum density is 80%, DENSITY A=M6.8&a(180) ......... 6 violations found. need... (2 Replies)
Discussion started by: ashokkrishna063
2 Replies

9. Shell Programming and Scripting

Help for programming a UNIX Shell in C++

Hello! :) I currently got the task of programming a UNIX Shell for practice. The functionality is as follows: 1. Entering commands with the keyboard. Enter stops the input and creates a process which should start any program 2. the shell waits for termination of each command before... (1 Reply)
Discussion started by: DarkDan
1 Replies

10. Homework & Coursework Questions

Help for programming a UNIX Shell in C++

1. The problem statement, all variables and given/known data: Hello! :) I currently got the task of programming a UNIX Shell for practice. The functionality is as follows: 1. Entering commands with the keyboard. Enter stops the input and creates a process which should start any program 2.... (0 Replies)
Discussion started by: DarkDan
0 Replies
REPERTOIREMAP(5)						 Linux User Manual						  REPERTOIREMAP(5)

NAME
repertoiremap - map symbolic character names to Unicode code points DESCRIPTION
A repertoire map defines mappings between symbolic character names (mnemonics) and Unicode code points when compiling a locale with localedef(1). Using a repertoire map is optional, it is needed only when symbolic names are used instead of now preferred Unicode code points. Syntax The repertoiremap file starts with a header that may consist of the following keywords: comment_char is followed by a character that will be used as the comment character for the rest of the file. It defaults to the number sign (#). escape_char is followed by a character that should be used as the escape character for the rest of the file to mark characters that should be interpreted in a special way. It defaults to the backslash (). The mapping section starts with the keyword CHARIDS in the first column. The mapping lines have the following form: <symbolic-name> <code-point> comment This defines exactly one mapping, comment being optional. The mapping section ends with the string END CHARIDS. FILES
/usr/share/i18n/repertoiremaps Usual default repertoire map path. CONFORMING TO
POSIX.2. NOTES
Repertoire maps are deprecated in favor of Unicode code points. EXAMPLE
A mnemonic for the Euro sign can be defined as follows: <Eu> <U20AC> EURO SIGN SEE ALSO
locale(1), localedef(1), charmap(5), locale(5) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU
2016-07-17 REPERTOIREMAP(5)
All times are GMT -4. The time now is 04:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy