01-24-2011
Quote:
Originally Posted by
gameboy87
If the file content has many tags , what shall I do ?
Provide a better example of the input file and the desired output.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I would need to generate Oracle Inster scripts from an excel formatted spreadsheet as follows:
This needs to be stripped as follows:
REC 1, REC 2 etc are the separators of the records ...
I beleive a pearl script can be written for this ... anything useful will be of... (8 Replies)
Discussion started by: sabyasm
8 Replies
2. Shell Programming and Scripting
I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies
3. UNIX for Advanced & Expert Users
Hi Folks,
I am working on a data extraction script in perl.I am a begineer in perl and shell scripting. So i need your inputs to solve the script problem.
I have data coming from database in the format :-
<b> _ABC (Apply Changes) (p) </b> _EFG | HIJ | KLM | WER
<b> _E3R (Apply Changes)... (3 Replies)
Discussion started by: subhotech
3 Replies
4. Shell Programming and Scripting
Can anyone convert this from sed to perl:
sed -n '/\var\/log/p' /etc/syslog.conf
I think Ive looked at this to much....urgh..
Thanks
Ben (5 Replies)
Discussion started by: bigben1220
5 Replies
5. Shell Programming and Scripting
Hi,
I am facing an issue with sed in perl. I have a file which has 2 header lines and one trailer line. I need to process the file without these headers and trailer. My file looks like :
File.txt:-
Header1
Header2
data1
data2
trailer
For removing header and trailer from file I am using... (5 Replies)
Discussion started by: abhisharma23
5 Replies
6. Shell Programming and Scripting
In a file the content is
13 box google unix.com "he is google" hello "he is unix.com" -
I need to replace each space char with "a" char but not inside the double quoted strings.
So, the output must look like,
13aboxagoogleaunix.coma"he is google"ahelloa"he is unix.com"a-
I tried with ... (9 Replies)
Discussion started by: gameboy87
9 Replies
7. Shell Programming and Scripting
I have a large text csv file that I'm working with. It will look something like this:
D,",E",C
O,"F,",I
O,gh,R
The second column always has a two digit random code (can be numbers, letters or any characters). When one of the characters happens to be a comma, the string is quoted. I want to... (5 Replies)
Discussion started by: beenny
5 Replies
8. Shell Programming and Scripting
Hi guys
First of all a salute to this wonderful platform which has helped me many a times. Im now faced with something that I cannot solve.
I have data like this
11:14:18 0.46975
11:14:18 0.07558
11:14:18 0.00020
11:14:18 0.00120
11:14:18 0.25879
11:14:19 0.00974
11:14:19 0.05656... (13 Replies)
Discussion started by: jamie_123
13 Replies
9. Shell Programming and Scripting
Hi,
I'm trying to use perl the way I use sed.
Lets say I have this command:
$ echo abc | sed 's/abc/&&/'
abcabcIf I try this with perl, I end up with this:
$ echo abc | perl -pe 's/abc/&&/'
&&How do I make the '&' sign work?
Another thing that I can't get with perl is this:
$ echo... (4 Replies)
Discussion started by: Subbeh
4 Replies
10. Shell Programming and Scripting
I am having trouble re-writing this sed code
sed -nr 's/.*del(+)ins(+).*NC_0{4}(+).*g\.(+)_(+).*/\3\t\4\t\5\t\1\t\2/p' C:/Users/cmccabe/Desktop/Python27/out_position.txt > C:/Users/cmccabe/Desktop/Python27/out_parse.txt in perl Basically, what the code does is parse text from two fields... (12 Replies)
Discussion started by: cmccabe
12 Replies
LEARN ABOUT DEBIAN
gtk2::pagesetup
Gtk2::PageSetup(3pm) User Contributed Perl Documentation Gtk2::PageSetup(3pm)
NAME
Gtk2::PageSetup - wrapper for GtkPageSetup
HIERARCHY
Glib::Object
+----Gtk2::PageSetup
METHODS
pagesetup = Gtk2::PageSetup->new
pagesetup = Gtk2::PageSetup->new_from_file ($file_name)
o $file_name (localized file name)
May croak with a Glib::Error in $@ on failure.
Since: gtk+ 2.12
pagesetup = Gtk2::PageSetup->new_from_key_file ($key_file, $group_name)
o $key_file (Glib::KeyFile)
o $group_name (string or undef)
May croak with a Glib::Error in $@ on failure.
Since: gtk+ 2.12
double = $setup->get_bottom_margin ($unit)
o $unit (Gtk2::Unit)
$setup->set_bottom_margin ($margin, $unit)
o $margin (double)
o $unit (Gtk2::Unit)
double = $setup->get_left_margin ($unit)
o $unit (Gtk2::Unit)
$setup->set_left_margin ($margin, $unit)
o $margin (double)
o $unit (Gtk2::Unit)
$setup->load_file ($file_name)
o $file_name (string)
May croak with a Glib::Error in $@ on failure.
Since: gtk+ 2.14
$setup->load_key_file ($key_file, $group_name)
o $key_file (Glib::KeyFile)
o $group_name (string or undef)
May croak with a Glib::Error in $@ on failure.
Since: gtk+ 2.14
pageorientation = $setup->get_orientation
$setup->set_orientation ($orientation)
o $orientation (Gtk2::PageOrientation)
double = $setup->get_page_height ($unit)
o $unit (Gtk2::Unit)
double = $setup->get_page_width ($unit)
o $unit (Gtk2::Unit)
double = $setup->get_paper_height ($unit)
o $unit (Gtk2::Unit)
$setup->set_paper_size_and_default_margins ($size)
o $size (Gtk2::PaperSize)
papersize = $setup->get_paper_size
$setup->set_paper_size ($size)
o $size (Gtk2::PaperSize)
double = $setup->get_paper_width ($unit)
o $unit (Gtk2::Unit)
double = $setup->get_right_margin ($unit)
o $unit (Gtk2::Unit)
$setup->set_right_margin ($margin, $unit)
o $margin (double)
o $unit (Gtk2::Unit)
$setup->to_file ($file_name)
o $file_name (localized file name)
May croak with a Glib::Error in $@ on failure.
Since: gtk+ 2.12
$setup->to_key_file ($key_file, $group_name)
o $key_file (Glib::KeyFile)
o $group_name (string or undef)
Since: gtk+ 2.12
double = $setup->get_top_margin ($unit)
o $unit (Gtk2::Unit)
$setup->set_top_margin ($margin, $unit)
o $margin (double)
o $unit (Gtk2::Unit)
ENUMS AND FLAGS
enum Gtk2::PageOrientation
o 'portrait' / 'GTK_PAGE_ORIENTATION_PORTRAIT'
o 'landscape' / 'GTK_PAGE_ORIENTATION_LANDSCAPE'
o 'reverse-portrait' / 'GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT'
o 'reverse-landscape' / 'GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE'
enum Gtk2::Unit
o 'pixel' / 'GTK_UNIT_PIXEL'
o 'points' / 'GTK_UNIT_POINTS'
o 'inch' / 'GTK_UNIT_INCH'
o 'mm' / 'GTK_UNIT_MM'
SEE ALSO
Gtk2, Glib::Object
COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
perl v5.14.2 2012-05-27 Gtk2::PageSetup(3pm)