Sponsored Content
Top Forums Shell Programming and Scripting Version Control Through the Shell Script Post 302476614 by Anji on Thursday 2nd of December 2010 05:56:29 AM
Old 12-02-2010
Version Control Through the Shell Script

Version Control Through the Shell Script

Hi Guys,
Apologize for the big request, please take some time and read it completely... This is Very important for me, and ur help is Very much Appriciated.

I want to maintain the Version control to all my scripts running in Production server, I am not allowed to use any tool like Perforce,clearcase, etc... So thought to write the script for it, which manages the Version control to my scripts which are changing everytim,

Here is the brief about my plan about it, please suggest how can I implement it, or also if there is another way to do it through script,that will be v helpful...

I have around 100 scripts under one folder, for example /home/Anji
I am planning to create one more folder under it namely Versions, like /home/Anji/Versions.
and copy all the 100 scripts under the versions folder without any content in it(Blank Scripts) with VC extension[To understand this is a VersionContraol file for the script]

For Ex:
One of my script under /home/Anji is batch_Trades.sh, which contaned 1000 lines of code,which will be changed when ever there is a request from users...

I will create the same script name batch_Trades.sh_VC /home/Anji/Versions folder...


So Everytime when I change the original script batch_Trades.sh I want to record the Version control in batch_Trades.sh_VC file in below manner,

####################################################
Version: 1.0
Script Name:
CR Number:
Date:
Reason for changing the script:
Change Implementer:
####################################################

For the first We need to define the pattern, and from 2nd time onwords,Version must be change dynamically [may be we can get the version id from previous version and do +1 to that) For all the other fields in the pattern, we need to give them from the command line when we run the script like below..

$./Version.sh batch_Trades.sh [Below is the command output script needs to ask when we run]
Do you want to continue (y/n) : y
What is the Script Name: batch_Trades.sh
What is the CR Number: 12345
What is Change Date: 02-11-2010
Reason for changing the script: Businmess Requst
Who is the Change Implementer: Anji
Finished Script....
$

Once all the Information is Given then, automatically this information should append to the VC file which is under /Home/Anji/Versions folder, i.e., batch_Trades.sh_VC

This is little bit big mail.... but i just wnated to give the full details to understand better.

Thanks In Advance Guys
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Version Control

I am not sure if this is the right forum to post my question on Version Control. Anyway, here it is! I use CVS for source code maintainence in my Solaris box. Is there any command where I can find out in CVS, if any check-in/check-out was done in the last 24 hours? I need a listing of all the... (3 Replies)
Discussion started by: Deepa
3 Replies

2. Shell Programming and Scripting

control over shell script

Hi.. I have a perl program that uses "system" to execute a shell script called startengine. The script "startengine" itself calls a lot of other smaller scripts to setup the engine etc. It finally has to execute ./engine which is another shell script which is long and takes a long time to... (3 Replies)
Discussion started by: JLJ
3 Replies

3. Shell Programming and Scripting

How to Control Cronjobs using Shell Script??

Hi All, Now i am running the 3 oracle procedures one by one manually. Query: If 1st Procedure OUT_PUT is Success, then call 2nd Procedure. If 2nd Procedure OUT_PUT is Success, then call 3rd Procedure. If 1st Procedure is failed, then no need of calling the other ... (8 Replies)
Discussion started by: hanu_oracle
8 Replies

4. Shell Programming and Scripting

how to disable and enable <control>-c or -z in a shell script

Dear all, good day. i'm asking about how to disable <control>-c or <control>-z in the beginning of a shell script then enable it again before the script exit Best Regards ---------- Post updated at 04:41 AM ---------- Previous update was at 04:18 AM ---------- Dear All i found the... (3 Replies)
Discussion started by: islam.said
3 Replies

5. Shell Programming and Scripting

Control browser from shell script

I have a browser running in a separate virtual terminal and would like to be able to send shortcut codes (e.g. ctrl+A) to the browser (and have it react) from a bash script in a separate virtual terminal. I need to keep the script in the separate virtual terminal. (2 Replies)
Discussion started by: slak0
2 Replies

6. UNIX for Dummies Questions & Answers

Simple version control script for text files

HI guys, Could you help me writing a simple version control script for a text files. the format could be ./version_control <file(s)> (I want it to be able to work with more than 1 file at the same time) commands are add and get, add means you add new file(s) to the archive, get means you... (4 Replies)
Discussion started by: s3270226
4 Replies

7. Shell Programming and Scripting

Control m Character removal shell script

can anyone share script for how to remove control m character (1 Reply)
Discussion started by: pw227j
1 Replies

8. Programming

Version control for audit

Hi.I am running some scripts from a "scripts" directory for my job (I am working in Financial industry).For compliance purposes I need to use a "release" directory when running them using some sort of version control(CVS,SVN or GIT) in case the program is audited.Basically I have to maintain a dev... (0 Replies)
Discussion started by: rolleikid
0 Replies

9. Shell Programming and Scripting

Passing control back to the shell script

Hi All, I have a shell script(test_abc.sh) with the following shell commands, which are invoking the same shell script with different parameters. test_abc.sh . ./test.sh abc >> test.log . ./test.sh xyz >> test.log . ./test.sh pys >> test.log . ./test.sh abc >> test.log . . ... (4 Replies)
Discussion started by: dev.devil.1983
4 Replies
Locale::Codes::Script(3pm)				 Perl Programmers Reference Guide				Locale::Codes::Script(3pm)

NAME
Locale::Codes::Script - standard codes for script identification SYNOPSIS
use Locale::Codes::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Codes::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $script = code2script('phnx','alpha'); $script = code2script('phnx',LOCALE_SCRIPT_ALPHA); The codesets currently supported are: alpha, LOCALE_SCRIPT_ALPHA This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. It also includes additions to this set included in the IANA language registry. The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. num, LOCALE_SCRIPT_NUMERIC This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Codes::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Codes::Script::delete_script ( CODE [,CODESET] ) Locale::Codes::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Codes::Script::delete_script_alias ( NAME ) Locale::Codes::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.unicode.org/iso15924/ Home page for ISO 15924. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::Script(3pm)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy