Sponsored Content
Top Forums Shell Programming and Scripting Extraction of various lines from a hugh file Post 302190200 by srsahu75 on Tuesday 29th of April 2008 03:23:31 AM
Old 04-29-2008
Hi,
Thank you very much for the help. The script is very useful upto 70% of my need. I will try to do something for rest of my 30%.

Thanking you
With regards
Satya
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help on file extraction

Hello, Im trying to extract a portion of a big file. Using unique pattern /occurrence , (ex. loginname1,logoff and loginname2,logoff ), I like to print the lines that contain the patterns and the lines between them. Also, create a file for every login occurrence. Thanks for everyone's... (1 Reply)
Discussion started by: apalex
1 Replies

2. UNIX for Dummies Questions & Answers

Flat File Extraction

Hi all, I'm new in the unix environment. I'm having a challenge in extracting data from a flat file and convert it to a CSV file format or I should be able to open it with MS Excel. The input data in my flat file looks like this: AV00001001155000063637143326711145412082EM SITHOLE... (3 Replies)
Discussion started by: Mthimbana
3 Replies

3. Shell Programming and Scripting

Data Extraction From a File

Hi All, I have a requirement where I have to search the file with some text say "Exception". This exception word can be repeated for more then 10 times. Suppose the "Exception" word is repeated at line numbers say x=10, 50, 60, 120. Now I want to extract all the lines starting from x-5 to... (3 Replies)
Discussion started by: rrangaraju
3 Replies

4. Shell Programming and Scripting

File extraction without awk

Hello everybody, Here is my problem : I cannot find a way to extract data from a particular file and more precisely I cannot extract the result of my awk script to an external file because I am currently working on HP-UX. I would like a simple script (without awk) which asks for a date like... (4 Replies)
Discussion started by: freyr
4 Replies

5. Shell Programming and Scripting

File Extraction

Hi, I have three files as below: AA.DAT20110505063903.Z AA.DAT20110405062903.Z AA.DAT20110305061903.Z All the above files are appended with Date and timestamp in compressed format. I need to extract AA.DAT20110505063903.Z(which is the latest file) from one server and uncompress it... (2 Replies)
Discussion started by: pyaranoid
2 Replies

6. Shell Programming and Scripting

problem with file content extraction

I need to extract some content of a file. Example file abc vi abc ooooooooo bbbbbbbbb vvv 1234 5 vvv 6789 3 xxxxxxxxxx xxxxxxxxxx i want to extract only the following content from file abc and store in another file say temp. 1234 5 6789 3 what should be my approach? (2 Replies)
Discussion started by: priya_ag04
2 Replies

7. Shell Programming and Scripting

data extraction from a file

Hi Freinds, I have a file1.txt in the following format File1.txt I want to get 2 files from the above file filextra.txt should have the lines which are ending with "<" and remaining lines in the filecompare.txt file. Please help. (3 Replies)
Discussion started by: i150371485
3 Replies

8. Shell Programming and Scripting

FILE_ID extraction from file name and save it in CSV file after looping through each folders

FILE_ID extraction from file name and save it in CSV file after looping through each folders My files are located in UNIX Server, i want to extract file_id and file_name from each file .and save it in a CSV file. How do I do that? I have folders in unix environment, directory structure is... (15 Replies)
Discussion started by: princetd001
15 Replies

9. Shell Programming and Scripting

CSV file data extraction

Hi I am writing a shell script to parse a CSV file , in which i am facing a problem to separate the columns . Could some one help me with it. IN301330/00001 pvavan kumar limited xyz@ttccpp.com IN302148/00002 PRECIOUS SECURITIES (P) LTD viash@yahoo.co.in IN300239/00000 CENTRE india... (8 Replies)
Discussion started by: nanduri
8 Replies

10. UNIX for Beginners Questions & Answers

Extraction of .gz file using 7zip fails

Hi, My target is to send a file created by Unix process to myself as an excel file. So I have used the below commands to achieve it. tr -d '\t' < PROGRAM_CREATED_FILE | sed -e 's/\\//g' | awk 'BEGIN{FS=">"; OFS="\t"} '{$1=$1}1' > file.xls gzip -9 file.xls echo "test mail" | sendxchange -a... (3 Replies)
Discussion started by: PikK45
3 Replies
MooseX::SimpleConfig(3pm)				User Contributed Perl Documentation				 MooseX::SimpleConfig(3pm)

NAME
MooseX::SimpleConfig - A Moose role for setting attributes from a simple configfile SYNOPSIS
## A YAML configfile named /etc/my_app.yaml: foo: bar baz: 123 ## In your class package My::App; use Moose; with 'MooseX::SimpleConfig'; has 'foo' => (is => 'ro', isa => 'Str', required => 1); has 'baz' => (is => 'rw', isa => 'Int', required => 1); # ... rest of the class here ## in your script #!/usr/bin/perl use My::App; my $app = My::App->new_with_config(configfile => '/etc/my_app.yaml'); # ... rest of the script here #################### ###### combined with MooseX::Getopt: ## In your class package My::App; use Moose; with 'MooseX::SimpleConfig'; with 'MooseX::Getopt'; has 'foo' => (is => 'ro', isa => 'Str', required => 1); has 'baz' => (is => 'rw', isa => 'Int', required => 1); # ... rest of the class here ## in your script #!/usr/bin/perl use My::App; my $app = My::App->new_with_options(); # ... rest of the script here ## on the command line % perl my_app_script.pl -configfile /etc/my_app.yaml -otherthing 123 DESCRIPTION
This role loads simple configfiles to set object attributes. It is based on the abstract role MooseX::ConfigFromFile, and uses Config::Any to load your configfile. Config::Any will in turn support any of a variety of different config formats, detected by the file extension. See Config::Any for more details about supported formats. Like all MooseX::ConfigFromFile -derived configfile loaders, this module is automatically supported by the MooseX::Getopt role as well, which allows specifying "-configfile" on the commandline. ATTRIBUTES
configfile Provided by the base role MooseX::ConfigFromFile. You can provide a default configfile pathname like so: has '+configfile' => ( default => '/etc/myapp.yaml' ); You can pass an array of filenames if you want, but as usual the array has to be wrapped in a sub ref. has '+configfile' => ( default => sub { [ '/etc/myapp.yaml', '/etc/myapp_local.yml' ] } ); Config files are trivially merged at the top level, with the right-hand files taking precedence. CLASS METHODS
new_with_config Provided by the base role MooseX::ConfigFromFile. Acts just like regular "new()", but also accepts an argument "configfile" to specify the configfile from which to load other attributes. Explicit arguments to "new_with_config" will override anything loaded from the configfile. get_config_from_file Called internally by either "new_with_config" or MooseX::Getopt's "new_with_options". Invokes Config::Any to parse "configfile". AUTHOR
Brandon L. Black, <blblack@gmail.com> LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-19 MooseX::SimpleConfig(3pm)
All times are GMT -4. The time now is 06:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy