Sponsored Content
Top Forums Shell Programming and Scripting extract string and sending it into a new file in perl program Post 302422527 by durden_tyler on Tuesday 18th of May 2010 04:13:19 PM
Old 05-18-2010
Code:
$
$
$ cat test.out
[ DEBUG - conn=-1 op=-1 msgId=-1 - libdb: PANIC: fatal region error detected; run recovery
export test: Processed 224000 entries
[ DEBUG - conn=-1 op=-1 msgId=-1 - libdb: PANIC: fatal region error detected; run recovery
export test: Processed 224000 entries
[ DEBUG - conn=-1 op=-1 msgId=-1 - libdb: PANIC: fatal region error detected; run recovery
export test: Processed 224000 entries
[ DEBUG - conn=-1 op=-1 msgId=-1 - libdb: PANIC: fatal region error detected; run recovery
$
$
$ perl -lne 'BEGIN {open(OUT, ">panic.txt")} /PANIC/ && print OUT $_; END{close(OUT)}' test.out
$
$
$ cat panic.txt
[ DEBUG - conn=-1 op=-1 msgId=-1 - libdb: PANIC: fatal region error detected; run recovery
[ DEBUG - conn=-1 op=-1 msgId=-1 - libdb: PANIC: fatal region error detected; run recovery
[ DEBUG - conn=-1 op=-1 msgId=-1 - libdb: PANIC: fatal region error detected; run recovery
[ DEBUG - conn=-1 op=-1 msgId=-1 - libdb: PANIC: fatal region error detected; run recovery
$
$

tyler_durden
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl newbie: how to extract an unknown word from a string

hi, im quite new to perl regexp. i have a problem where i want to extract a word from a given string. but the word is unknown, only fact is that it appears as the second word in the string. Eg. input string(s) : char var1 = 'A'; int var2 = 10; char *ptr; and what i want to do is... (3 Replies)
Discussion started by: wolwy_pete
3 Replies

2. Shell Programming and Scripting

Search for string in a file and extract another string to a variable

Hi, guys. I have one question: I need to search for a string in a file, and then extract another string from the file and assign it to a variable. For example: the contents of the file (group) is below: ... ftp:x:23: mail:x:34 ... testing:x:2001 sales:x:2002 development:x:2003 ...... (6 Replies)
Discussion started by: daikeyang
6 Replies

3. Shell Programming and Scripting

Perl Extract String

Hi, I have a string like "something is good wanted (bla bla)" I need to get the world "wanted" from this string and "assign it to a variable".. but it's not a static word so i want to get that word by searching the pattern as follows <space>desiredword<space>( and i tried to get that... (6 Replies)
Discussion started by: xlynx3
6 Replies

4. Shell Programming and Scripting

Perl and sending file to server

Hi, I am trying to write some test code for bigger project where my perl script will send file over to server. This is the current SERVER and CLIENT code I have so far. When I type "hi" from client I get hello back from server and like wise I send send command I get respond back the problem... (1 Reply)
Discussion started by: Dabheeruz
1 Replies

5. Shell Programming and Scripting

Perl REGEX - How do extract a string in a line?

Hi Guys, In the following line: cn=portal.090710.191533.428571000,cn=groups,dc=mp,dc=rj,dc=gov,dc=br I need to extract this string: portal.090710.191533.428571000 As you can see this string always will be bettween "cn=" and "," strings. Someone know one regular expression to... (4 Replies)
Discussion started by: maverick-ski
4 Replies

6. Shell Programming and Scripting

Sending email and attachment file using Perl

I am trying to send an email body of information and also attachment using perl script, but I am only able to send the body but not an attachment. is there around it without using "use MIME::Lite;" module. $user = "bataf\@xyz.com"; $subjectt = "mail from perl"; open(MAIL, "| mailx -s... (1 Reply)
Discussion started by: bataf
1 Replies

7. Shell Programming and Scripting

Extract string from a file & write to a new file (Perl)

Hi, This is the first time playing around with perl and need some help. Assuming if i have a line of text that looks like this: Date/Time=Nov 18 17:12:11;Device Name=192.168.1.1;Device IP=192.168.1.1;Device Class=IDS;Source IP=155.212.212.111;Source Name=UNKNOWN;Source Port=1679... (3 Replies)
Discussion started by: LuckyGuy
3 Replies

8. Shell Programming and Scripting

Sending zip file as attachments in perl

Hi All, i have a code, where that script is sending mail to the users, but i want to enhance it, i.e i need to add attachment(zip file) to that, i dont want to use MIME:LITE module or any other module, with this simple code, i need to enhance. below is my code my %mail_params = (HTML ... (13 Replies)
Discussion started by: asak
13 Replies

9. Shell Programming and Scripting

Extract a string between 2 ref string from a file

Hi, May i ask if someone share some command for extracting a string between 2 ref string in a txt file My objective: i had a file with multiple lines and wants only to extract the string "watch?v=IbkAXOmEHpY" or "watch?v=<11 random character>", when i used "grep 'watch?=*' i got a results per... (4 Replies)
Discussion started by: jao_madn
4 Replies

10. Shell Programming and Scripting

Extract n-digits from string in perl

Hello, I have a log file with logs such as 01/05/2017 10:23:41 : file.log.38: database error, MODE=SINGLE, LEVEL=critical, STATE: 01170255 (mode main how can i use perl to extract the 8-digit number below from the string 01170255 Thanks (7 Replies)
Discussion started by: james2009
7 Replies
xcb_xfixes_set_picture_clip_region(3)				   XCB Requests 			     xcb_xfixes_set_picture_clip_region(3)

NAME
xcb_xfixes_set_picture_clip_region - SYNOPSIS
#include <xcb/xfixes.h> Request function xcb_void_cookie_t xcb_xfixes_set_picture_clip_region(xcb_connection_t *conn, xcb_render_picture_t picture, xcb_xfixes_region_t region, int16_t x_origin, int16_t y_origin); REQUEST ARGUMENTS
conn The XCB connection to X11. picture TODO: NOT YET DOCUMENTED. region TODO: NOT YET DOCUMENTED. x_origin TODO: NOT YET DOCUMENTED. y_origin TODO: NOT YET DOCUMENTED. DESCRIPTION
RETURN VALUE
Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the event loop. If you want to handle errors directly with xcb_request_check instead, use xcb_xfixes_set_picture_clip_region_checked. See xcb-requests(3) for details. ERRORS
This request does never generate any errors. SEE ALSO
AUTHOR
Generated from xfixes.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. XCB
2014-06-10 xcb_xfixes_set_picture_clip_region(3)
All times are GMT -4. The time now is 10:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy