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
COLUMN(1)						    BSD General Commands Manual 						 COLUMN(1)

NAME
column -- columnate lists SYNOPSIS
column [-ntx] [-c columns] [-s sep] [file ...] DESCRIPTION
The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by default, from the standard input. Empty lines are ignored. The options are as follows: -c Output is formatted for a display columns wide. -s Specify a set of characters to be used to delimit columns for the -t option. -t Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with the characters supplied using the -s option. Useful for pretty-printing displays. -x Fill columns before filling rows. -n By default, the column command will merge multiple adjacent delimiters into a single delimiter when using the -t option; this option disables that behavior. This option is a Debian GNU/Linux extension. ENVIRONMENT
The COLUMNS, LANG, LC_ALL and LC_CTYPE environment variables affect the execution of column as described in environ(7). EXIT STATUS
The column utility exits 0 on success, and >0 if an error occurs. EXAMPLES
(printf "PERM LINKS OWNER GROUP SIZE MONTH DAY " ; printf "HH:MM/YEAR NAME " ; ls -l | sed 1d) | column -t SEE ALSO
colrm(1), ls(1), paste(1), sort(1) HISTORY
The column command appeared in 4.3BSD-Reno. BUGS
Input lines are limited to LINE_MAX (2048) bytes in length. BSD
July 29, 2004 BSD
All times are GMT -4. The time now is 04:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy