Hi all,
I'm quite new to unix and hope that someone can help me on this.
I'm using csh.
Below is what i intend to do.
1. I stored some data in a file.
2. I intend to read the file line by line and store each line of data into a variable, so that i can used it later.
Anyone have any... (4 Replies)
Hi Experts.
I need to list the file and the filename comes from the file ListOfFile.txt.
Basicly I have a filename "ListOfFile.txt" and it contain
Example of ListOfFile.txt
/home/Dave/Program/Tran1.P
/home/Dave/Program/Tran2.P
/home/Dave/Program/Tran3.P
/home/Dave/Program/Tran4.P... (7 Replies)
Hi,
I have gps receiver log..its giving readings .like below
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GPSD,R=1
$GPGSV,3,1,11,08,16,328,40,11,36,127,00,28,33,283,39,20,11,165,00*71... (3 Replies)
Friends,
I have a file output.txt with values as below:
092307135717
061910135717
I want to know how to read this file and then assign each value to a variable.
say like
var1=092307135717
var2=061910135717
So that I can use this VAR1 and Var2 in the shell script for further processing.... (3 Replies)
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
I need to read temp.$i file content line by line through while loop but somehow the '\' do not appear in output.. Can someone guide how to read this exact content line by line in unix :
if
then
cat temp.$i | head -1 # the file content appears fine
while... (13 Replies)
Hello,
I am using below code for reading from a file and assigning the values to a variable , but it is loosing the value after the loop , please suggest to retain the value of the variable after the loop ,
while IFS=: read -r line
do
set $dsc=$line
echo 'printing line variable ' $line... (1 Reply)
I have a variable and assigned the following values
***XYZ_201519_20150929140642_20150929140644_211_0_0_211
I need to read this variable from backward and stop read when I get first underscore (_)
In this scenario I should get 211
Thanks
Kris (3 Replies)
Hi all,
i need a bash script.
I have a 3 file named Milano, Torino, Firenze
Into file i have:
Milano
Marco
Luca
Giorgio
Michele
PatrizioTorino
Marco
Giulio
Emilio
MicheleFirenze
Luca
Giorgio
Marco
Saverio
EmilioThe output should be a all_city.csv file like: (3 Replies)
Hello All,
While searching for the question, I found some answers but my implementation is not giving expected output.
I have two files; one is sourcefile, other is named template.
What I want to do is to search each line in template, when found all columns, cut the matching line from source... (4 Replies)
Discussion started by: baris35
4 Replies
LEARN ABOUT OSX
svn::dump
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)