Capture all the contents between two attributes


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Capture all the contents between two attributes
# 8  
Old 10-28-2008
Hi Giri,

I am using HP-UX and for me its working fine.

$ cat file.txt
adfadsfafaf
asdfasfasdfasdfasdfasfasf
test123
qwwww
sdsad
asdasd
asdad
adadsw
sasfar
sfaf
a

afasf
OPERATION END
kgfkg
sfbf
OPERATION END
asdfadsfdasfadsfasdfasf
asdfasdfasfdasfasdfasdfasdfsadfasdfdasf

$ awk '/test123/,/OPERATION END/' file.txt
test123
qwwww
sdsad
asdasd
asdad
adadsw
sasfar
sfaf
a

afasf
OPERATION END
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

File attributes ????

I'm trying to sort out the charing of a problem folder, in the 'ls -l' list is shows as: d???????????? ? ? ? ? ? Pi-Share PiShare is the name of the directory, all the ??s make no sense to me at all, and no user (there are only two, pi and root) can make any changes to it.... (4 Replies)
Discussion started by: MuntyScrunt
4 Replies

2. Shell Programming and Scripting

Folder contents getting appended as strings while redirecting file contents to a variable

Hi one of the output of the command is as below # sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/' Resource List : <br> *************************** 1. row ***************************<br> ... (2 Replies)
Discussion started by: vivek d r
2 Replies

3. AIX

Identify User Attributes

SOS Guys... Is there any way to determine the user attributes, mainly if that userid is set as never expire? I do not have admin rights, and I'm working on AIX 5.3 I've tried : lsuser -f <username> but no luck on that (2 Replies)
Discussion started by: freakygs
2 Replies

4. UNIX for Advanced & Expert Users

Help with can't get execution attributes

Hi Gurus, I am trying to create a FS using SVM but system is throwing the following error. newfs /dev/md/rdsk/d1002 newfs: construct a new file system /dev/md/rdsk/d1002: (y/n)? y /usr/sbin/clri: can't get execution attributes (1 Reply)
Discussion started by: rama krishna
1 Replies

5. AIX

disk attributes from HMC

Guys Is there a way to determine the attributes of the disks installed in a system p box through HMC? (Like disk type and capacity) Thanks in advance Bala (2 Replies)
Discussion started by: balaji_prk
2 Replies

6. UNIX for Dummies Questions & Answers

Problems with any ls attributes

I got a server (test server) that hangs anytime we run a ls attribute like ls -ltr or ls -al. We can run ls | more command with no problem. But getting back to the ls attribute problem, it just sits and hangs, I did a ps -ef | grep ls, and a user had 15 sessions of ls -al running, I killed those,... (3 Replies)
Discussion started by: Sarccastik Dude
3 Replies

7. Shell Programming and Scripting

file attributes

How to retrieve file attributes in a sh/bash script (modification time, access time, size, etc.)? (1 Reply)
Discussion started by: Hitori
1 Replies

8. UNIX for Dummies Questions & Answers

how to find system attributes

hi, i am very- very new to unix i have os - sun solaris 5.9 and i want to learn more about system attributes for example, the make - model of machine , operating system & patch versions can somebody tell me a usefull command to learn these? any help would be apreciated, regards to all,... (3 Replies)
Discussion started by: merope
3 Replies

9. Shell Programming and Scripting

file attributes

how do we set file attributes at shell prompt (2 Replies)
Discussion started by: hytechpro
2 Replies

10. Shell Programming and Scripting

rcp and file attributes

Good day Does anyone have an idea on how I can rcp a file together with its attributes. owner,group, permissions ? Regards J (2 Replies)
Discussion started by: jhansrod
2 Replies
Login or Register to Ask a Question
install::TempContent::Objects::mod_perl-2.0.9::docs::apiUserdContributinstall::TempContent::Objects::mod_perl-2.0.9::docs::api::ModPerl::Global(3)

NAME
ModPerl::Global -- Perl API for manipulating special Perl lists Synopsis use ModPerl::Global (); my $package = 'MyApache2::Package'; # make the END blocks of this package special ModPerl::Global::special_list_register(END => $package); # Execute all encoutered END blocks from this package now ModPerl::Global::special_list_call( END => $package); # delete the list of END blocks ModPerl::Global::special_list_clear( END => $package); Description "ModPerl::Global" provides an API to manipulate special perl lists. At the moment only the "END" blocks list is supported. This API allows you to change the normal Perl behavior, and execute special lists when you need to. For example "ModPerl::RegistryCooker" uses it to run "END" blocks in the scripts at the end of each request. Before loading a module containing package $package, you need to register it, so the special blocks will be intercepted by mod_perl and not given to Perl. "special_list_register" does that. Later on when you want to execute the special blocks, "special_list_call" should be called. Unless you want to call the list more than once, clear the list with "special_list_clear". API
"ModPerl::Global" provides the following methods: "special_list_call" Call the special list $ok = special_list_call($key => $package); arg1: $key ( string ) The name of the special list. At the moment only 'END' is supported. arg2: $package ( string ) what package to special list is for ret: $ok ( boolean ) true value if $key is known, false otherwise. since: 2.0.00 "special_list_clear" Clear the special list $ok = special_list_clear($key => $package); arg1: $key ( string ) The name of the special list. At the moment only 'END' is supported. arg2: $package ( string ) what package to special list is for ret: $ok ( boolean ) true value if $key is known, false otherwise. since: 2.0.00 "special_list_register" Register the special list $ok = special_list_call($key => $package); arg1: $key ( string ) The name of the special list. At the moment only 'END' is supported. arg2: $package ( string ) what package to special list is for ret: $ok ( boolean ) true value if $key is known, false otherwise. since: 2.0.00 Notice that you need to register the package before it is loaded. If you register it after, Perl has already compiled the "END" blocks and there are no longer under your control. See Also mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.18.2 20install::TempContent::Objects::mod_perl-2.0.9::docs::api::ModPerl::Global(3)