02-07-2008
I didn't mention this but it need to be in a perl script.
Thanks,
Zed
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to edit each line in a file. The file has several columns delimitted by '|'.
I need to take out the last two columns.
Each line starts with a unique word through which I am storing the lines in a variable and cutting the last two colums.
But, when I am echoing the line, it is... (2 Replies)
Discussion started by: chiru_h
2 Replies
2. Shell Programming and Scripting
Greetings,
I have a file: hostnames.txt which has -
# cat hostnames.txt
machine1
machine2
I need the output to be saved to a variable as:
HOSTNAMELIST=machine1,machine2
Please advise.
Thanks,
Chiru (3 Replies)
Discussion started by: chiru_h
3 Replies
3. Shell Programming and Scripting
Hi,
sample file looks like this..
<hp>
<name>
<detail>adsg</detail>
...
...
</name><ft>4264</ft>
</hp>
I need to edit the last but one line using perl script. I want the format to be ..
<hp>
<name>
<detail>adsg</detail>
...
...
</name> (9 Replies)
Discussion started by: meghana
9 Replies
4. Shell Programming and Scripting
Is there a way to edit a file without opening two files
the only method I know is
one file for reading from
and one file writing to
I cannot think of any other ways (4 Replies)
Discussion started by: 3junior
4 Replies
5. Shell Programming and Scripting
How to edit file content at the specific line? For example at below
The things to edit --> This is line 2. And it is below line 1.
This is line 1.
This is line 2. # i want to append some words at this row line. How?
This is line 3. (8 Replies)
Discussion started by: alvin0618
8 Replies
6. Shell Programming and Scripting
Hello All,
My file content is:
DROP TABLE
"FACT_WORLD";
CREATE TABLE "FACT_WORLD" (
"AR_ID" INTEGER NOT NULL,
"ORG_ID" INTEGER NOT NULL
)
DATA CAPTURE NONE
COMPRESS YES;
I want to change this file to have entries in one... (6 Replies)
Discussion started by: akash2508
6 Replies
7. Shell Programming and Scripting
We have a huge file which has just one really large line; about 500 MB. I want to
1. Count all the occurrences of a phrase
2. Replace the phrase with another.
Trying to open it using vi has not helped as it complains that it is too large. Can any script help? Please advise.
Thank you, (12 Replies)
Discussion started by: kaushikadya
12 Replies
8. Shell Programming and Scripting
Hi friends,
Issue1:
I have a text file with the first line like this
#chrom start end Readcount_A Normalized_Readcount_A ReadcountB Normalized_Readcount_B Fc_A_vs_B pvalue_A_vs_B FDR_A_vs_B Fc_B_vs_A pvalue_B_vs_A FDR_B_vs_A <a href="http://unix.com/">Link</a>
How can I change it to the... (11 Replies)
Discussion started by: jacobs.smith
11 Replies
9. Shell Programming and Scripting
Hi,
I have a file like
$ cat abc
HDR XXX
content XXX
content YYY
content XXX
content YYY
content XXX
content YYY
TRL YYYI want to replace the lines staritng with HDR and TRL
For this I have written below code
#!/usr/bin/perl -w
use strict;
open ( FH , "+< abc" ) || die "Can't... (1 Reply)
Discussion started by: sam05121988
1 Replies
10. Shell Programming and Scripting
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
LEARN ABOUT OSX
svn::simple::edit
SVN::Simple::Edit(3) User Contributed Perl Documentation SVN::Simple::Edit(3)
NAME
SVN::Simple::Edit - A simple interface for driving svn delta editors
SYNOPSIS
my $edit = SVN::Simple::Edit->new
(_editor => [SVN::Repos::get_commit_editor($repos, "file://$repospath",
'/', 'root', 'FOO', &committed)],
);
$edit->open_root($fs->youngest_rev);
$edit->add_directory ('trunk');
$edit->add_file ('trunk/filea');
$edit->modify_file ("trunk/fileb", "content", $checksum);
$edit->delete_entry ("trunk/filec");
$edit->close_edit ();
...
$edit->copy_directory ('branches/a, trunk, 0);
DESCRIPTION
SVN::Simple::Edit wraps the subversion delta editor with a perl friendly interface and then you could easily drive it for describing
changes to a tree. A common usage is to wrap the commit editor, so you could make commits to a subversion repository easily.
This also means you can not supply the $edit object as an delta_editor to other API, and that's why this module is named ::Edit instead of
::Editor.
See SVN::Simple::Editor for simple interface implementing a delta editor.
PARAMETERS
for constructor
_editor
The editor that will receive delta editor calls.
missing_handler
Called when parent directory are not opened yet, could be:
&SVN::Simple::Edit::build_missing
Always build parents if you don't open them explicitly.
&SVN::Simple::Edit::open_missing
Always open the parents if you don't create them explicitly.
SVN::Simple::Edit::check_missing ([$root])
Check if the path exists on $root. Open it if so, otherwise create it.
root
The default root to use by SVN::Simple::Edit::check_missing.
base_path
The base path the edit object is created to send delta editor calls.
noclose
Do not close files or directories. This might make non-sorted operations on directories/files work.
METHODS
Note: Don't expect all editors will work with operations not sorted in DFS order.
open_root ($base_rev)
add_directory ($path)
open_directory ($path)
copy_directory ($path, $from, $fromrev)
add_file ($path)
open_file ($path)
copy_file ($path, $from, $fromrev)
delete_entry ($path)
change_dir_prop ($path, $propname, $propvalue)
change_file_prop ($path, $propname, $propvalue)
close_edit ()
AUTHORS
Chia-liang Kao <clkao@clkao.org>
COPYRIGHT
Copyright 2003-2004 by Chia-liang Kao <clkao@clkao.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
perl v5.10.0 2005-02-23 SVN::Simple::Edit(3)