Sponsored Content
Top Forums Shell Programming and Scripting Getting lines before and until next pattern in file /awk, sed Post 302715069 by ocramas on Saturday 13th of October 2012 05:40:26 PM
Old 10-13-2012
Thanks guys, the last post from msabhi did the trick! but I was also able to get a lot of good things from the previous answers.

thanks,
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to awk/sed/grep lines which contains a pattern at a given position

Dear friends I am new to linux and was trying to split some files userwise in our linux server. I have a data file of 156 continuous columns named ecscr final. I want the script to redirect all the lines containing a pattern of 7 digits to separate files. I was using grep to do that,... (2 Replies)
Discussion started by: anoopvraj
2 Replies

2. Shell Programming and Scripting

sed/awk to insert multiple lines before pattern

I'm attempting to insert multiple lines before a line matching a given search pattern. These lines are generated in a separate function and can either be piped in as stdout or read from a temporary file. I've been able to insert the lines from a file after the pattern using: sed -i '/pattern/... (2 Replies)
Discussion started by: zksailor534
2 Replies

3. Shell Programming and Scripting

sed/awk : how to delete lines based on IP pattern ?

Hi, I would like to delete lines in /etc/hosts on few workstations, basically I want to delete all the lines for a list of machines like this : for HOST in $(cat stations.lst |uniq) do # echo -n "$HOST" if ping -c 1 $HOST > /dev/null 2>&1 then HOSTNAME_val=`rsh $HOST "sed... (3 Replies)
Discussion started by: albator1932
3 Replies

4. 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

5. Shell Programming and Scripting

Sed/awk/perl command to replace pattern in multiple lines

Hi I know sed and awk has options to give range of line numbers, but I need to replace pattern in specific lines Something like sed -e '1s,14s,26s/pattern/new pattern/' file name Can somebody help me in this.... I am fine with see/awk/perl Thank you in advance (9 Replies)
Discussion started by: dani777
9 Replies

6. Shell Programming and Scripting

Replacing lines matching a multi-line pattern (sed/perl/awk)

Dear Unix Forums, I am hoping you can help me with a pattern matching problem. What am I trying to do? I want to replace multiple lines of a text file (that match a multi-line pattern) with a single line of text. These patterns can span several lines and do not always have the same number of... (10 Replies)
Discussion started by: thefang
10 Replies

7. 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

8. Shell Programming and Scripting

Using awk or sed to find a pattern that has lines before and after it

Dear gurus, Please help this beginner to write and understand the required script. I am looking for useing awk for sed. I have a few thousand lines file whose contain are mostly as below and I am trying to achieve followings. 1. Find a string, say user1. Then hash the line containing the... (6 Replies)
Discussion started by: ran_bon_78
6 Replies

9. 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

10. UNIX for Beginners Questions & Answers

awk with sed to combine lines and remove specific odd # pattern from line

In the awk piped to sed below I am trying to format file by removing the odd xxxx_digits and whitespace after, then move the even xxxx_digit to the line above it and add a space between them. There may be multiple lines in file but they are in the same format. The Filename_ID line is the last line... (4 Replies)
Discussion started by: cmccabe
4 Replies
roartips(7)						System Manager's Manual: RoarAuido					       roartips(7)

NAME
roartips - Tips for RoarAudio users SYNOPSIS
roard [OPTIONS...] ... roarclient [OPTIONS...] ... DESCRIPTION
This manpage lists some tips for intermedia to advanced users of RoarAudio. CONTROLLING ROARD
RoarAudio supports a lot of things you can change on the fly. This includes the volume for each stream as you may allready noticed: If you cange the volume within a player only this stream is changed, other streams keep there loudness. There a a lot other things that can be changed on the fly. To do this there is a tool called roarctl(1). You may want to play around a bit with it. A good start are to try those two commands: roarctl --help roarctl allinfo The later one will show you all information current available of the server it self, the clients and the streams. This may include a lot of information. SERVER ADDRESS
There a serverel types of server addresses based on the protocol used to communicate. This lists the corrently implemented types in order of importance: /path/to/sock Path to UNIX Domain Socket. Example: /tmp/roar host, host:port This is used for connections over TCP/IP. If port is omitted the default port is used. Examples: audio.homeserver.local localhost:7564 node::, node::object, ::object, :: This is the way to specify a DECnet connection to node node's object object. Both may be omitted to use defaults. Default node name is local hosts node name. Examples: mynode:: ::roar yournode::yourroard +fork This starts a new roard for every roar_connect(3). This is used internaly by the lib to emulate EsounD's fallback. ENVIRONMENT
ROAR_SERVER This varibale contains the default server address. If some client does not allow a user to set a server address or to set a default value this one come into play. Examples: ROAR_SERVER=some.host ROAR_SERVER=another.host:port ROAR_SERVER=node:: ROAR_SERVER=/tmp/roar SEE ALSO
roarcat(1), roarctl(1), roarfilt(1), roarfish(1), roarmon(1), roarvorbis(1), roard(1), libroar(7). RoarAudio August 2008 roartips(7)
All times are GMT -4. The time now is 11:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy