Sponsored Content
Top Forums Shell Programming and Scripting awk to print all lines after a pattern is found Post 302733213 by alister on Tuesday 20th of November 2012 12:56:56 AM
Old 11-20-2012
Substitute your pattern for PAT:
Code:
awk '/PAT/,0' file

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

print next word after found pattern

Hi all, I'd like to print the next word after a found pattern. example text: word1 word2 word3 word4 pattern word5 pattern word1 word2 word3 word4 word1 word2 pattern word4 basiclly the word after pattern. Thanks (9 Replies)
Discussion started by: stinkefisch
9 Replies

2. Shell Programming and Scripting

How to print the lines between the pattern using awk/grep/sed?

Hi, I need a help to search a pattern and print the multiple lines between them. Input file: Tue May 29 12:30:33 EDT 2012:threadWebContainer : 357:com.travimp.hotelierlinks.abba.service.RequestHandler.requestService(String, ITICSDataSet): hotelCancelReservation request: ... (4 Replies)
Discussion started by: aroragaurav.84
4 Replies

3. Shell Programming and Scripting

Copy/print all lines between pattern is found in .log files

Hi, I have a folder with multiple (< 33) .log files. And I have to copy the lines between two patterns from all the .log files to a new file. (script file with a loop?) Thanks in advance. 1.log ... .. xx1> begin ... .. .. >>> Total: 2 Alarms .. .. (17 Replies)
Discussion started by: AK47
17 Replies

4. Shell Programming and Scripting

awk print pattern match line and following lines

Data: Pattern Data Data Data Data Data Data Data Data Data ... With awk, how do I print the pattern matching line, then the subsequent lines following the pattern matching line. Varying number of lines following the pattern matching line. (9 Replies)
Discussion started by: dmesserly
9 Replies

5. Shell Programming and Scripting

Print character after pattern found

Hi Gurus, i need your help to create a script the will print a characters after the pattern was found. Sample lines are below: My birthday:"1977-16-07", My birthday:"1975-16-07" My birthday:"1970-16-07". My patter should be "birthday:", then i want to print the following characters which... (18 Replies)
Discussion started by: scripter123
18 Replies

6. Shell Programming and Scripting

Awk: print lines with one of multiple pattern in the same field (column)

Hi all, I am new to using awk and am quickly discovering what a powerful pattern-recognition tool it is. However, I have what seems like a fairly basic task that I just can't figure out how to perform in one line. I want awk to find and print all the lines in which one of multiple patterns (e.g.... (8 Replies)
Discussion started by: elgo4
8 Replies

7. UNIX for Dummies Questions & Answers

awk - (URGENT!) Print lines sort and move lines if match found

URGENT HELP IS NEEDED!! I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but - Currently, script is not printing lines to File3.txt in order. - Also the matching lines are not moving out of File1.txt ... (1 Reply)
Discussion started by: High-T
1 Replies

8. UNIX for Dummies Questions & Answers

awk - Print lines if only matching key is found

I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but - Currently, script is not printing lines to File3.txt in order. Thanks a lot. Any help is appreciated. Script I am using: awk 'FNR == NR && ! /^]*$/ {... (9 Replies)
Discussion started by: High-T
9 Replies

9. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies

10. UNIX for Beginners Questions & Answers

Sed/awk join lines once pattern found

Hi all OS - RHEL6.4 I have input file -f1.txt I need to search line which starts with \Start and read next line till it gets blank line and join them all. I need to trim any trailing spaces for each line.So output.txt should be.. \Start\now\fine stepwatch this space for toolsends... (7 Replies)
Discussion started by: krsnadasa
7 Replies
ESMERGE(1)							   User Commands							ESMERGE(1)

NAME
esmerge - merge audio and video ES into a TS DESCRIPTION
Usage: esmerge [switches] <video-file> <audio-file> <output-file> TS tools version 1.11, esmerge built Nov 11 2008 17:15:46 Merge the contents of two Elementary Stream (ES) files, one containing video data, and the other audio, to produce an output file containing Transport Stream (TS). Files: <video-file> is the ES file containing video. <audio-file> is the ES file containing audio. <output-file> is the resultant TS file. Switches: -quiet, -q Only output error messages. -verbose, -v Output information about each audio/video frame. -x Output diagnostic information. -h264 The video stream is H.264 (the default) -avs The video stream is AVS -vidrate <hz> Video frame rate in Hz - defaults to 25Hz. -rate <hz> Audio sample rate in Hertz - defaults to 44100, i.e., 44.1KHz. -cd Equivalent to -rate 44100 (CD rate), the default. -dat Equivalent to -rate 48000 (DAT rate). -adts The audio stream is ADTS (the default) -l2 The audio stream is MPEG layer 2 audio -mp2adts The audio stream is MPEG-2 style ADTS regardless of ID bit -mp4adts The audio stream is MPEG-4 style ADTS regardless of ID bit -ac3 The audio stream is Dolby AC-3 in ATSC -patpmtfreq <f> PAT and PMT will be inserted every <f> video frames. by default, f = 0 and PAT/PMT are inserted only at the start of the output stream. Limitations =========== For the moment, the video input must be H.264 or AVS, and the audio input ADTS, AC-3 ATSC or MPEG layer 2. Also, the audio is assumed to have a constant number of samples per frame. esmerge <video-file> <audio-file> <output-file> TS tools version 1.11, esmerge built Nov 11 2008 17:15:46 Merge the contents of two Elementary Stream (ES) files, one containing video data, and the other audio, to produce an output file containing Transport Stream (TS). Files: <video-file> is the ES file containing video. <audio-file> is the ES file containing audio. <output-file> is the resultant TS file. Switches: -quiet, -q Only output error messages. -verbose, -v Output information about each audio/video frame. -x Output diagnostic information. -h264 The video stream is H.264 (the default) -avs The video stream is AVS -vidrate <hz> Video frame rate in Hz - defaults to 25Hz. -rate <hz> Audio sample rate in Hertz - defaults to 44100, i.e., 44.1KHz. -cd Equivalent to -rate 44100 (CD rate), the default. -dat Equivalent to -rate 48000 (DAT rate). -adts The audio stream is ADTS (the default) -l2 The audio stream is MPEG layer 2 audio -mp2adts The audio stream is MPEG-2 style ADTS regardless of ID bit -mp4adts The audio stream is MPEG-4 style ADTS regardless of ID bit -ac3 The audio stream is Dolby AC-3 in ATSC -patpmtfreq <f> PAT and PMT will be inserted every <f> video frames. by default, f = 0 and PAT/PMT are inserted only at the start of the output stream. Limitations =========== For the moment, the video input must be H.264 or AVS, and the audio input ADTS, AC-3 ATSC or MPEG layer 2. Also, the audio is assumed to have a constant number of samples per frame. SEE ALSO
The full documentation for esmerge is maintained as a Texinfo manual. If the info and esmerge programs are properly installed at your site, the command info esmerge should give you access to the complete manual. esmerge 1.11 November 2008 ESMERGE(1)
All times are GMT -4. The time now is 09:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy