Sponsored Content
Full Discussion: CVS file operation in Perl
Top Forums Shell Programming and Scripting CVS file operation in Perl Post 302367525 by gentleDean on Tuesday 3rd of November 2009 03:25:20 AM
Old 11-03-2009
CVS file operation in Perl

Hi All,

I have one CVS file, and doing some actions on it. I have removed some columns by

Code:
SWITCH: {
                          $column eq 'COL1' && do {next;};
                          $column eq 'COL2' && do {next;};
                          push(@columns, $column);
                        }

Now I want to shift COL3 to last column. i.e.

Code:
Input:
COL23,COL3,COL21

Output:
COL23,COL21,COL3

Please help!!

---------- Post updated at 02:25 AM ---------- Previous update was at 12:31 AM ----------

no worries dudes.... done with the solution...
Smilie
gentleDean
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

CVS, Perl and VI

I am trying to write a Perl script to cover a few CVS commands (setup specifically), however the VI screen that pops up and requests a comment, what is the best way of entering the text automatically (will be a variable name) and then saving that cvs notification from my Perl program? Help is... (2 Replies)
Discussion started by: Shakey21
2 Replies

2. UNIX for Advanced & Expert Users

Adding a CVS tag to a new file

All, I've been working with perl scripts and shell scripts for quite some time now. I've been making code changes and submitting them into cvs. But I've never created a new file and added it to the directory tree. I know the cvs commands to add it to the directory tree. What I don't know is... (1 Reply)
Discussion started by: rahulrathod
1 Replies

3. Shell Programming and Scripting

script grabbing cvs file .....

how do I write a script to checkout a file in cvs and cat the file into a file in my home directory Commands are cd /home/smr/sandbox cvsroot choose option 1 cvs co filename cat filename > /home/smr/newfilename Thank you! (4 Replies)
Discussion started by: llsmr777
4 Replies

4. UNIX for Dummies Questions & Answers

Copy a windows CVS file to the unix server as a svs file

I so desperately need a script to copy a windows csv file to my unix server and i know these should be at dummies but i have no bits. it is life & no job situation help please. thanks (1 Reply)
Discussion started by: zhegal
1 Replies

5. Shell Programming and Scripting

Problem in attaching CVS file to the mail

i wrote this code(( cat $REPORT_EMAIL;uuencode <$OUTFILE $OUTFILE ) | mailx -s "Auto Policy Attach Report Before batch job " $SUPPORT_EMAIL_GRP) in my shell script to attach afile but in the mail i donot get a attachment contais of the mail is Auto Policy Attach Report Before batch job... (0 Replies)
Discussion started by: alokjyotibal
0 Replies

6. Shell Programming and Scripting

Perl: combine Backtick & system() I/O operation?

Hi - Within perl I want to execute a system command. I want to re-direct all the output from the command to a file (@result = `$cmd`;), but I ALSO want the results to be displayed on the screen (system("$cmd"); The reason is this - if the command completes, I want to process the output. If the... (6 Replies)
Discussion started by: jeffw_00
6 Replies

7. Shell Programming and Scripting

Column operation : cosne and sine operation

I have a txt file with several columns and i want to peform an operation on two columns and output it to a new txt file . file.txt 900.00000 1 1 1 500.00000 500.00000 100000.000 4 4 1.45257346E-07 899.10834 ... (4 Replies)
Discussion started by: shashi792
4 Replies

8. Programming

updating data in cvs file using c programming

hi every one i want to read and write data from cvs file using c program. but my problem is that at run time my data is increasing in both row wise and column wise. that means it is continuously updating in both direction. is there any way through which i can find the next colum or row for eg... (0 Replies)
Discussion started by: sajidtariq
0 Replies

9. Programming

How to create a new file in a CVS repository

I have a coding project that I'm working on, and I'm tracking revisions using CVS. I'm working on a branch (branch1) at version 1.1.2.1. Anyway, I created a new C file in the directory for the project, but I can't commit it. The tutorial I read on CVS said that version numbers will be assigned... (6 Replies)
Discussion started by: Ultrix
6 Replies

10. Shell Programming and Scripting

How To Save A File As A .cvs

Hello. I have a file of text with columns: aaaa bbbb ccc dddd aaaa bbbb ccc dddd aaaa bbbb ccc dddd How can this be converted to a .csv file? Thanks (4 Replies)
Discussion started by: jimmyf
4 Replies
cvslock(1)							   User Manuals 							cvslock(1)

NAME
cvslock - lock CVS repositories SYNOPSIS
cvslock [-q] [-p pid] [-d CVS root] [-R|-W] [-u|-s|-c Command] [-l] directory DESCRIPTION
cvslock is used to lock a tree starting at directory in your CVS repository during low-level manipulation or inspection. There are various modes of operation: You can use the -s or -c options to cause cvslock to spawn a sub-shell or a shell command from which you can safely access the source repository. You can also use cvslock to lock and unlock CVS repositories from shell scripts; in this case you'll want to use the -p option to specify the process ID which is written to the lock files' names. The default when given no options is to acquire a persistant read lock. OPTIONS
-q This option tells cvslock to shut up and not print any diagnostic messages to stdout. This is most useful when using the program in conjunction with, e.g., rsync(1). -p pid The CVS lock files generated by this utility have the current process ID in their name to distinguish them from lock files generated by other tools such as cvs itself or concurrent sessions of cvslock. Use this option to force cvslock to use a specific pid. This is in most useful from shell scripts. -d CVS root This optional argument tells cvslock where your CVS repository's root is. If no -d switch is given, cvslock will fall back to the CVSROOT environment variable. Note that cvslock only works on local repositories, so don't try to access pserver or rsh-accessible remote repositories this way. -R This switch tells cvslock to acquire a lock for safe reading of the repository. -W This switch tells cvslock to acquire a write lock on the repository. -s When invoked with this option, cvslock will invoke the user's login shell as determined by the SHELL environment variable after locking the repository. After the user has left that shell, cvslock will drop the locks. -c Command This option is similar to the -s option, with the difference that cvslock will execute the shell command given on the command line instead of giving the user an interactive shell. -u When given this option, cvslock will try to drop a previously created lock on the repository in question. Using this option together with the -s or -c options is an error. The use of -p is highly recommended in conjunction with this option! -l This option tells cvslock to lock only the directory specified. Normally it locks the entire directory hierarchy under the speci- fied directory. DIAGNOSTICS
cvslock spits out some diagnostics to the standard error stream. It's exit value is zero if and only if the locking operation requested by the user could be performed successfully. Note that no diagnostics about the exit value of commands executed through the -c switch are given. BUGS
The signal handling is not too well-tested and may be broken. If you try to create the same lock several times, you will get funny effects due to the error recovery cvslock tries to do. SEE ALSO
Version Management with CVS rsync(1), system(3), cvs(1) AUTHOR
cvslock was put together in a quick hacking session by Thomas Roessler <roessler@guug.de> and may be distributed under the terms of the GNU General Public License version 2. Unix October 1998 cvslock(1)
All times are GMT -4. The time now is 12:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy