Sponsored Content
Top Forums Shell Programming and Scripting replace space with delimiter in whole file -perl Post 302167535 by meghana on Thursday 14th of February 2008 05:29:10 PM
Old 02-14-2008
i will correct the loop position..thanks for that jim...
hey sb008.. im writing a perl script.. not a shell.. but still thanks for ur suggestion.. i can use it when i do a shell ..

thanks for ur replies
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replace delimiter : with '\001' in unix data file

HI can any one tell me how to replace a delimiter : with another delimiter '\001' it is a non printable octal character. thanks in adv spandu (4 Replies)
Discussion started by: spandu
4 Replies

2. Shell Programming and Scripting

how to differentiate columns of a file in perl with no specific delimiter

Hi everybody, This time I am having one issue in perl. I have to create comma separated file using the following type of information. The problem is the columns do not have any specific delimiter. So while using split I am getting different value. Some where it is space(S) and some where it is... (9 Replies)
Discussion started by: Amiya Rath
9 Replies

3. Shell Programming and Scripting

replace space with comma in perl

arr_Ent_NameId variable holds 'Prakash pawar' 'sag' '23' '50000' this value 'Prakash pawar' 'sag' '23' '50000' I want to replace space( ) with comma (,) There are 4 fields here. I don't want to replace first field with comma. output should be: 'Prakash,pawar','sag','23','50000' ... (2 Replies)
Discussion started by: pritish.sas
2 Replies

4. Shell Programming and Scripting

comma delimiter and space

I have a csv file and there is a problem which I need to resolve. Column1,Column2,Colum3,Column4 ,x,y,z ,d,c,v t,l,m,n ,h,s,k ,k,,y z,j, ,p Now if you see column1 for row 1 and row 4 though they are null there is a space but in case of row2 and row 5 there is no space. I want row... (3 Replies)
Discussion started by: RubinPat
3 Replies

5. Shell Programming and Scripting

Space as a delimiter

not sure if i'm doing this right i'm new tho this but i'm trying to use a space as a delimiter with the cut command my code is size=$( du -k -S -s /home/cmik | cut -d' ' -f1 ) i've also tried -f2 and switching the -d and -f around if that does anything (3 Replies)
Discussion started by: Cmik
3 Replies

6. Shell Programming and Scripting

Need to use delimiter as : and space in awk

Hi , Please suggest me how do I use : (colon and one space) as a delimiter in awk Best regards, Vishal (2 Replies)
Discussion started by: Vishal_dba
2 Replies

7. Shell Programming and Scripting

Perl Code to change file delimiter (passed as argument) to bar delimiter

Hi, Extremely new to Perl scripting, but need a quick fix without using TEXT::CSV I need to read in a file, pass any delimiter as an argument, and convert it to bar delimited on the output. In addition, enclose fields within double quotes in case of any embedded delimiters. Any help would... (2 Replies)
Discussion started by: JPB1977
2 Replies

8. Shell Programming and Scripting

Replace file name with Space as content

Hi, I am having a files in my directory like this: 2014 1049_file1.txt 2014 1050_file2.txt 2014 1110_file3.txt 2014 1145_file4.txt 2014 2049_file5.txt I need to replace the above file names like this without changing the content of filename: file1.txt file2.txt file3.txt... (10 Replies)
Discussion started by: rohit_shinez
10 Replies

9. Shell Programming and Scripting

Replace a space with underscore in a file

i have a file with following data. { EqName "Tan 1" .... .... } { EqName "Sin 2" ... ... } I have to replace the value of EqName to Tan_1 and Sin_2 in file.Can i use sed or awk ? cat file|grep EqName|awk '{print $2 $3}'|sed -i 's//_/g' I tried with this but it... (2 Replies)
Discussion started by: Jag02
2 Replies

10. Shell Programming and Scripting

Replace delimiter for a particular column in a pipe delimited file

I have an input file as below Emp1|FirstName|MiddleName|LastName|Address|Pincode|PhoneNumber 1234|FirstName1|MiddleName2|LastName3| Add1 || ADD2|123|000000000 Output : 1234|FirstName1|MiddleName2|LastName3| Add1 ,, ADD2|123|000000000 OR 1234,FirstName1,MiddleName2,LastName3, Add1 ||... (2 Replies)
Discussion started by: styris
2 Replies
SVN::Dump(3)						User Contributed Perl Documentation					      SVN::Dump(3)

NAME
SVN::Dump - A Perl interface to Subversion dumps SYNOPSIS
#!/usr/bin/perl use strict; use warnings; use SVN::Dump; my $file = shift; my $dump = SVN::Dump->new( { file => $file } ); # compute some stats my %type; my %kind; while ( my $record = $dump->next_record() ) { $type{ $record->type() }++; $kind{ $record->get_headers()->{'Node-action'} }++ if $record->type() eq 'node'; } # print the results print "Statistics for dump $file: ", " version: ", $dump->version(), " ", " uuid: ", $dump->uuid(), " ", " revisions: ", $type{revision}, " ", " nodes: ", $type{node}, " "; print map { sprintf " - %-7s: %d ", $_, $kind{$_} } sort keys %kind; DESCRIPTION
This module is an alpha release. The interfaces will probably change in the future, as I slowly learn my way inside the SVN dump format. An "SVN::Dump" object represents a Subversion dump. This module follow the semantics used in the reference document (the file notes/fs_dumprestore.txt in the Subversion source tree): o A dump is a collection of records ("SVN::Dump::Record" objects). o A record is composed of a set of headers (a "SVN::Dump::Headers" object), a set of properties (a "SVN::Dump::Property" object) and an optional bloc of text (a "SVN::Dump::Text" object). o Some special records ("delete" records with a "Node-kind" header) recursively contain included records. Each class has a "as_string()" method that prints its content in the dump format. The most basic thing you can do with "SVN::Dump" is simply copy a dump: use SVN::Dump; my $dump = SVN::Dump->new( 'mydump.svn' ); print $dump->as_string(); # only print the dump header while( $rec = $dump->next_record() ) { print $rec->as_string(); } After the operation, the resulting dump should be identical to the original dump. METHODS
"SVN::Dump" provides the following methods: new( \%args ) Return a new "SVN::Dump" object. The argument list is a hash reference. If the "SVN::Dump" object will read information from a file, the arguments "file" is used (as usal, "-" means "STDIN"); if the dump is read from a filehandle, "fh" is used. If the "SVN::Dump" isn't used to read information, the parameters "version" and "uuid" can be used to initialise the values of the "SVN-fs-dump-format-version" and "UUID" headers. next_record() Return the next record read from the dump. This is a "SVN::Dump::Record" object. version() format() Return the dump format version, if the version record has already been read, or if it was given in the constructor. uuid() Return the dump UUID, if there is an UUID record and it has been read, or if it was given in the constructor. as_string() Return a string representation of the dump specific blocks (the "format" and "uuid" blocks only). SEE ALSO
"SVN::Dump::Reader", "SVN::Dump::Record". COPYRIGHT &; LICENSE Copyright 2006 Philippe 'BooK' Bruhat, All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2008-06-12 SVN::Dump(3)
All times are GMT -4. The time now is 03:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy