Sponsored Content
Top Forums Shell Programming and Scripting awk- report generation from input file Post 302175878 by McLan on Sunday 16th of March 2008 01:59:57 PM
Old 03-16-2008
Hi Aaron,
This is fine, so we are displaying 4 and 5 th fields of Address.
I am not sure if the street contains only 2 fields , it can contain more fields like “your and my straat & others straat as well”, in this case I can't use just 4 th and 5 th fileds.
So to be very clear, my requirement is
I need a 3 rd field from the line that contains Name with FS “ “ space:
I need 2 nd field from the line that contains Address with FS ( ) space and need 2 nd filed from the same line with FS ( “ ) Quote and
I need 2 nd field form the line that contains City with FS ( ) space.

Thanks again.
McLan
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Oracle Report generation

Hi, I am beginner in shell programming.In a shell script i found a call to a script 'runrep25m',which i think is to generate oracle reports?Could anyone help me by providing some details about its usage With Thanks & Regards Dileep (7 Replies)
Discussion started by: DILEEP410
7 Replies

2. UNIX for Dummies Questions & Answers

report generation

Hello, I got a requirement in writing a sheel script in unix, please help me out the requirement is there are two folders Folder1 and Folder2 and there are same files in the different folders. like file1,file2 in folder1 and file1 and file2 in folder2. I would like to compare all the... (2 Replies)
Discussion started by: gmahesh2k
2 Replies

3. Shell Programming and Scripting

Report generation

Hello, I got a requirement in writing a KSH script in unix, please help me out the requirement is there are two folders Folder1 and Folder2 and there are same files in the different folders. like file1,file2 in folder1 and file1 and file2 in folder2. I would like to compare all the similar... (3 Replies)
Discussion started by: gmahesh2k
3 Replies

4. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

5. Shell Programming and Scripting

Report Generation with Grep

All, I am pretty new to Unix Environment. I am not sure if my requirement can be accomplished in Unix. I did try searching this forum and others but could not get an answer. Requirement is explained below: I have a set of files in a folder. file1_unload file2_unload file3_unload... (7 Replies)
Discussion started by: bharath.gct
7 Replies

6. Shell Programming and Scripting

Dynamic output file generation using a input text file with predefined output format

Hi, I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format. Example: File.txt AP|{SSHA}VEEg42CNCghUnGhCVg== APVG3|{SSHA}XK|"password" AP3|{SSHA}XK|"This is test" .... etc --------- test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies

7. Shell Programming and Scripting

File Report Generation

hi all i need to generate a report file that contains the following details of files present in a directory. 1. File name 2.Complete path for each files and directory 3.File size 4.Days older example i have a directory testing that contains sub-directories and some files. i need to make a... (5 Replies)
Discussion started by: yashwantkumar
5 Replies

8. Shell Programming and Scripting

String generation from user input

Hi I have one thing I need advice on, and I don't know where to start so I have no sample code. I want the user to provide input like: 1-3,6,7,9-11 When the input is like this, I want a string to be generated including all the numbers. In the example above, the string would look like: 1... (13 Replies)
Discussion started by: Tobbev
13 Replies

9. Shell Programming and Scripting

Report generation using perl script

Hi, I have a perl script to read the log file and create a report from it. I have the script file and log file in a different directories. Now i have pipe the log file data to the perl script to create the report (HMTL file). I am using the below command this isn't working tail -f... (4 Replies)
Discussion started by: vel4ever
4 Replies

10. UNIX for Beginners Questions & Answers

Report generation using script

Hi all I have a unix script that generates a report with the following information: uptime, mounted file systems, disk usage (> 90% --> critical, <75%-90%> --> warning, < 75% healthy), Mem usage, CPU usage and load average. But I would like to create one single report containing all this... (5 Replies)
Discussion started by: fretagi
5 Replies
Moose::Manual::Classes(3)				User Contributed Perl Documentation				 Moose::Manual::Classes(3)

NAME
Moose::Manual::Classes - Making your classes use Moose (and subclassing) VERSION
version 2.0604 USING MOOSE
Using Moose is very simple, you just "use Moose": package Person; use Moose; That's it, you've made a class with Moose! There's actually a lot going on here under the hood, so let's step through it. When you load Moose, a bunch of sugar functions are exported into your class, such as "extends", "has", "with", and more. These functions are what you use to define your class. For example, you might define an attribute ... package Person; use Moose; has 'ssn' => ( is => 'rw' ); Attributes are described in the Moose::Manual::Attributes documentation. Loading Moose also enables the "strict" and "warnings" pragmas in your class. When you load Moose, your class will become a subclass of Moose::Object. The Moose::Object class provides a default constructor and destructor, as well as object construction helper methods. You can read more about this in the Moose::Manual::Construction document. As a convenience, Moose creates a new class type for your class. See the Moose::Manual::Types document to learn more about types. It also creates a Moose::Meta::Class object for your class. This metaclass object is now available by calling a "meta" method on your class, for example "Person->meta". The metaclass object provides an introspection API for your class. It is also used by Moose itself under the hood to add attributes, define parent classes, and so on. In fact, all of Moose's sugar does the real work by calling methods on this metaclass object (and other meta API objects). SUBCLASSING
Moose provides a simple sugar function for declaring your parent classes, "extends": package User; use Moose; extends 'Person'; has 'username' => ( is => 'rw' ); Note that each call to "extends" will reset your parents. For multiple inheritance you must provide all the parents at once, "extends 'Foo', 'Bar'". You can use Moose to extend a non-Moose parent. However, when you do this, you will inherit the parent class's constructor (assuming it is also called "new"). In that case, you will have to take care of initializing attributes manually, either in the parent's constructor, or in your subclass, and you will lose a lot of Moose magic. See the MooseX::NonMoose module on CPAN if you're interested in extending non-Moose parent classes with Moose child classes. CLEANING UP MOOSE DROPPINGS
Moose exports a number of functions into your class. It's a good idea to remove these sugar functions from your class's namespace, so that "Person->can('has')" will no longer return true. There are several ways to do this. We recommend using namespace::autoclean, a CPAN module. Not only will it remove Moose exports, it will also remove any other exports. package Person; use namespace::autoclean; use Moose; If you absolutely can't use a CPAN module (but can use Moose?), you can write "no Moose" at the end of your class. This will remove any Moose exports in your class. package Person; use Moose; has 'ssn' => ( is => 'rw' ); no Moose; MAKING IT FASTER
Moose has a feature called "immutabilization" that you can use to greatly speed up your classes at runtime. However, using it incurs a cost when your class is first being loaded. When you make your class immutable you tell Moose that you will not be changing it in the future. You will not be adding any more attributes, methods, roles, etc. This allows Moose to generate code specific to your class. In particular, it creates an "inline" constructor, making object construction much faster. To make your class immutable you simply call "make_immutable" on your class's metaclass object. __PACKAGE__->meta->make_immutable; Immutabilization and "new()" If you override "new()" in your class, then the immutabilization code will not be able to provide an optimized constructor for your class. Instead, you should use a "BUILD()" method, which will be called from the inlined constructor. Alternately, if you really need to provide a different "new()", you can also provide your own immutabilization method. Doing so requires extending the Moose metaclasses, and is well beyond the scope of this manual. AUTHOR
Moose is maintained by the Moose Cabal, along with the help of many contributors. See "CABAL" in Moose and "CONTRIBUTORS" in Moose for details. COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Infinity Interactive, Inc.. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.16.2 2012-09-19 Moose::Manual::Classes(3)
All times are GMT -4. The time now is 07:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy