Sponsored Content
Top Forums Shell Programming and Scripting Unix gurus : how to grep this pattern? Post 302297267 by Rahulpict on Friday 13th of March 2009 01:11:14 AM
Old 03-13-2009
yeah, I was able to remove \n.

my log file has....
============
Sending a signal to clean up NOT THREADED FMP process:
DATA #2 : ABCO_PID, PD_TYPE_PID, 4 bytes
11649230
============

I want to have output as....
Sending a signal to clean up NOT THREADED FMP process: 11649230

I used....

awk -F: '/Sending a/{a=$NF;getline;getline;printf "\"%s %s\"\n",substr(a,2),$0}' log.file

but it is displaying...text "Sending a signal to clean up NOT THREADED FMP process: "

rather just displays...

" 13054022"
" 7020548"
" 9773224"
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Any RF unix gurus out there?

I am having a problem here. We are having several problems in regards to hung process's on unix (HPUX box), caused by my RF equipment (Mobile data capture units). these contact the host via a simply telnet session and locks the system? Is it a timeout problem as the timeout is disabled on the host. (5 Replies)
Discussion started by: Subrosa
5 Replies

2. Shell Programming and Scripting

Help with shell script - Unix Gurus calling

Unix Gurus, I have been breaking my head to get this done..seems simple.. I need to read a flat file and based on a key word in a line, i need to skip the previous 3 lines. eg : Line1 Line2 Line3 Line4 Line5 Line6 Error Line7 Line8 Line9 Error Line10 (4 Replies)
Discussion started by: ravred
4 Replies

3. Shell Programming and Scripting

Unix/Linux gurus...here is Q 4u

Suppose I have two files 1.txt and 2.txt. My aim is to find (Total execution time/Number of executions) then sort the result as in decreasing order. Can anyone provide me any shell/perl/awk script or a Command to do that in faster way ? 1.txt : =============================== Number of... (4 Replies)
Discussion started by: Rahulpict
4 Replies

4. Shell Programming and Scripting

VI Editor - question for unix gurus !!

I have created a dummy file -demo.txt On my machine-A (oslevel-5300-08) I can display the file content in HEX format through VI editor using :%!xxd but on other machine-B (oslevel - 5300-06) , I get error as "sh: xxd: not found." machine-A: $ cat demo.txt Hello World ! I can display... (7 Replies)
Discussion started by: Rahulpict
7 Replies

5. Shell Programming and Scripting

Want to grep for a pattern and display the content above that pattern

Hi, When we have a failure, sometimes we just step restart the job from the next step. Later when we open the log for analysis of the failure, it is becoming difficult to go to the failure part. For eg., if it is a 1000 line log, the failure may be at 500th line. so wat i want to do is, grep... (6 Replies)
Discussion started by: ajayakunuri
6 Replies

6. Homework & Coursework Questions

finding pattern without grep in unix

how can i find related pattern in a text file without using grep command in unix (2 Replies)
Discussion started by: feint
2 Replies

7. Shell Programming and Scripting

Need Urgent Help from UNIX gurus to get specific data from a file

Hi, I have a file monitor.txt as below... # Times are converted to local time from GMT. # Local Timezone: EST (GMT -05:00) PARAM1 { TIME 30; CC1 "xxxxx"; CC2 "xxxxx"; CC3 "xxxxx"; CC4 "xxxxx"; } PARAM2 { 4061 :... (3 Replies)
Discussion started by: zaq1xsw2
3 Replies

8. Shell Programming and Scripting

How to Grep than scan line below grep pattern

Hello Colleagues, I have a file that looks like below. 6-12731913-12731913 9230760143480 410018547148230 20131002193434+0500 20131002193434+0500 ;20131002T161031000-10.50.241.21-21912131-1419034760, ver: 0 20131009 92220056296730 CC0P abc Core_Context_R1A SMS 6-12726796-12726796... (14 Replies)
Discussion started by: umarsatti
14 Replies

9. Shell Programming and Scripting

sed and awk usage to grep a pattern 1 and with reference to this grep a pattern 2 and pattern 3

Hi , I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows. # diff mir_lex.c.modified mir_lex.c.orig 3209c3209 < if(yy_current_buffer -> yy_is_our_buffer == 0) { --- >... (5 Replies)
Discussion started by: breezevinay
5 Replies

10. UNIX for Dummies Questions & Answers

Grep -v lines starting with pattern 1 and not matching pattern 2

Hi all! Thanks for taking the time to view this! I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern. Example: Drink a soda Eat a banana Eat multiple bananas Drink an apple juice Eat an apple Eat multiple apples I... (8 Replies)
Discussion started by: demmel
8 Replies
tapset::signal(3stap)													     tapset::signal(3stap)

NAME
tapset::signal - systemtap signal tapset DESCRIPTION
This family of probe points is used to probe signal activities. Since there are so many signals sent to processes at any given point, it is advisable to filter the information according to the requirements. For example, filter only for a particular signal (if sig==2) or for a particular process (if pid_name==stap). signal.send Signal being sent to a process See probe::signal.send(3stap) for details. signal.send.return Signal being sent to a process completed (deprecated in SystemTap 2.1) See probe::signal.send.return(3stap) for details. signal.checkperm Check being performed on a sent signal See probe::signal.checkperm(3stap) for details. signal.checkperm.return Check performed on a sent signal completed See probe::signal.checkperm.return(3stap) for details. signal.wakeup Sleeping process being wakened for signal See probe::signal.wakeup(3stap) for details. signal.check_ignored Checking to see signal is ignored See probe::signal.check_ignored(3stap) for details. signal.check_ignored.return Check to see signal is ignored completed See probe::signal.check_ignored.return(3stap) for details. signal.force_segv Forcing send of SIGSEGV See probe::signal.force_segv(3stap) for details. signal.force_segv.return Forcing send of SIGSEGV complete See probe::signal.force_segv.return(3stap) for details. signal.syskill Sending kill signal to a process See probe::signal.syskill(3stap) for details. signal.syskill.return Sending kill signal completed See probe::signal.syskill.return(3stap) for details. signal.sys_tkill Sending a kill signal to a thread See probe::signal.sys_tkill(3stap) for details. signal.systkill.return Sending kill signal to a thread completed See probe::signal.systkill.return(3stap) for details. signal.sys_tgkill Sending kill signal to a thread group See probe::signal.sys_tgkill(3stap) for details. signal.sys_tgkill.return Sending kill signal to a thread group completed See probe::signal.sys_tgkill.return(3stap) for details. signal.send_sig_queue Queuing a signal to a process See probe::signal.send_sig_queue(3stap) for details. signal.send_sig_queue.return Queuing a signal to a process completed See probe::signal.send_sig_queue.return(3stap) for details. signal.pending Examining pending signal See probe::signal.pending(3stap) for details. signal.pending.return Examination of pending signal completed See probe::signal.pending.return(3stap) for details. signal.handle Signal handler being invoked See probe::signal.handle(3stap) for details. signal.handle.return Signal handler invocation completed See probe::signal.handle.return(3stap) for details. signal.do_action Examining or changing a signal action See probe::signal.do_action(3stap) for details. signal.do_action.return Examining or changing a signal action completed See probe::signal.do_action.return(3stap) for details. signal.procmask Examining or changing blocked signals See probe::signal.procmask(3stap) for details. signal.procmask.return Examining or changing blocked signals completed See probe::signal.procmask.return(3stap) for details. signal.flush Flushing all pending signals for a task See probe::signal.flush(3stap) for details. get_sa_flags Returns the numeric value of sa_flags See function::get_sa_flags(3stap) for details. get_sa_flags Returns the numeric value of sa_handler See function::get_sa_flags(3stap) for details. get_sa_flags Returns the string representation of a sigset See function::get_sa_flags(3stap) for details. is_sig_blocked Returns 1 if the signal is currently blocked, or 0 if it is not See function::is_sig_blocked(3stap) for details. sa_flags_str Returns the string representation of sa_flags See function::sa_flags_str(3stap) for details. sa_handler Returns the string representation of an sa_handler See function::sa_handler(3stap) for details. signal_str Returns the string representation of a signal number See function::signal_str(3stap) for details. SEE ALSO
function::get_sa_flags(3stap), function::get_sa_flags(3stap), function::get_sa_flags(3stap), function::is_sig_blocked(3stap), function::sa_flags_str(3stap), function::sa_handler(3stap), function::signal_str(3stap), probe::signal.send(3stap), probe::signal.send.return(3stap), probe::signal.checkperm(3stap), probe::signal.checkperm.return(3stap), probe::signal.wakeup(3stap), probe::signal.check_ignored(3stap), probe::signal.check_ignored.return(3stap), probe::signal.force_segv(3stap), probe::signal.force_segv.return(3stap), probe::signal.syskill(3stap), probe::signal.syskill.return(3stap), probe::signal.sys_tkill(3stap), probe::signal.systkill.return(3stap), probe::signal.sys_tgkill(3stap), probe::signal.sys_tgkill.return(3stap), probe::signal.send_sig_queue(3stap), probe::signal.send_sig_queue.return(3stap), probe::signal.pending(3stap), probe::signal.pending.return(3stap), probe::signal.handle(3stap), probe::signal.handle.return(3stap), probe::signal.do_action(3stap), probe::signal.do_action.return(3stap), probe::signal.procmask(3stap), probe::signal.procmask.return(3stap), probe::signal.flush(3stap), stap(1), stapprobes(3stap) IBM
--- tapset::signal(3stap)
All times are GMT -4. The time now is 10:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy