Hi,
I want to know if you can input with sed but instead of specifing a line number like below I wan't to be able to insert based on a specific word or patttern.
10i\
Insert me after line 10
is this possible with sed or should I use AWK?
Thanks
Jack (2 Replies)
I am really need help with the regular expression in SED. From input file, I need to extract lines that have the port number (sport or dport) as defined. The input file is something like this
time=1209515280-1209515340 dst=192.168.133.202 src=208.70.8.23 bytes=2472 proto=6 sport=80 dport=1447... (6 Replies)
Hi,
If there exist multiple pattern in a file, how can I find the last record matching the pattern through perl.
The below script searches for the pattern everywhere in an input file.
#! /usr/bin/perl -s -wnl
BEGIN {
$pattern or
warn"Usage: $0 -pattern='RE' \n" and
exit 255;... (5 Replies)
I am working on a scraping project and I am stuck at this tiny grep pattern match.
Sample text :
FPA List. FPA List. FPA List. FPA List. FPA List. FPA List. FPA List. FPA List.
ABC Personal Planning
Catherine K. Wat
Cath Wat
Catherine K. Wat
Catherine K. Wat
IFRAME:... (8 Replies)
Hi all,
I have a text data file. My aim here is to find line called *FIELD* AV for every record and print lines after that till *FIELD* RF. But here I want first 3 to four lines for very record as well. FIELD AV is some where in between for very record. SO I am not sure how to retrieve lines in... (2 Replies)
Hi,
I need some help on how to print the whole data for unmatched pattern. i have 2 different files that need to be checked and print out the unmatched patterns into a new file. My sample data as follows:-
File1.txt
Id Num Activity Class Type
309 1.1 ... (5 Replies)
Hi,
I have script like below:
#!/usr/local/bin/perl
use strict;
use warnings;
while (<DATA>) {
( my ($s_id) = /^\d+\|(\d+?)\|/ ) ;
if ( $s_id == 1 ){
s/^(.*\|)*.*ABC\.pi=(+|+)*.*ABC\.id=(\d+|+).*$/$1$2|$3/s;
print "$1$2|$3\n"; (2 Replies)
Hello Friends,
I need to print lines in between two string when a keyword existed in those lines (keywords like exception, error, failed, not started etc).
for example,
input:
..
Begin Edr
ab12
ac13
ad14
bc23
exception occured
bd24
cd34
dd44
ee55
ff66
End Edr (2 Replies)
Hi experts,
I have a file with regexes which is used for automatic searches on several files (40+ GB).
To do some postprocessing with the grep result I need the matching line as well as the match itself.
I know that the latter could be achieved with grep's -o option. But I'm not aware of a... (2 Replies)
Hi I want to print the line until pattern is matched.
I am using below code:
sed -n '1,/pattern / p' file
It is working fine for me , but its not working for exact match.
sed -n '1,/^LAC$/ p' file
Input:
LACC FEGHRA 0
LACC FACAF 0
LACC DARA 0
LACC TALAC 0
LAC ILACTC 0... (8 Replies)
Discussion started by: Abhisrajput
8 Replies
LEARN ABOUT DEBIAN
stationlist.xml
stationlist.xml(5) File Formats Manual stationlist.xml(5)NAME
stationlist.xml - tvtime station configuration file
SYNOPSIS
~/.tvtime/stationlist.xml
DESCRIPTION
The stationlist.xml file contains the configuration of channel information for capture cards with tuners. It contains a list of active
channels along with their frequencies, renumbering information, and channel name. The stationlist.xml file is updated by tvtime at runtime
to store settings across sessions. For this reason, you should not edit this file while tvtime is running, as your changes may be over-
written.
This file is created or updated whenever channel information is changed in tvtime. This is done when renumbering a channel, using the
channel scanner, or manually activating or deactivating a specific channel from the list.
Channel settings are saved specific to norm and frequency table.
<?xml version="1.0"?>
<!DOCTYPE stationlist PUBLIC "-//tvtime//DTD stationlist 1.0//EN"
"http://tvtime.sourceforge.net/DTD/stationlist.dtd">
<stationlist xmlns="http://tvtime.sourceforge.net/DTD/">
<list norm="NTSC" frequencies="US-Cable">
<station ... />
... station list
</list>
</stationlist>
That is, each norm/frequency combination will get its own section in the configuration file. The frequencies name is not special, you can
have frequencies="foobar" and running
tvtime -f foobar
will do the right thing. The norm, however, must match the norm being used.
Entries in a list are in the following form:
<station name="CNN" active="1" position="18"
band="US Cable" channel="18"/>
<station name="DSF" active="1" position="12"
band="VHF E2-E12" channel="E12"/>
STATIONS
Each station has its own properties that should be set.
name The human-readable name of the current station.
active When set to 1, the channel is active. To deactivate the channel, set this value to 0.
position
This setting specifies the position the channel occupies on the dial. This allows users to arbitrarily map any particular channel
to a particular position on the dial.
band
channel
The possible bands and channels available in tvtime are:
Band name Channels provided
US Cable 1-99
US Cable 100 100-125
US Two-Way T7, T8, T9, T10, T11, T12 T13, T14
US Broadcast 2-83
China Broadcast 1-68, A1-A7, B1-B31, C1-C5
Japan Broadcast 1-62
Japan Cable 13-63
VHF E2-E12 E1-E12
VHF S1-S41 S1-S41
VHF Misc X, Y, Z, Z+1, Z+2
VHF France K01-K10, KB-KQ, H01-H19
VHF Russia R1-R12, SR1-SR19
VHF Australia AS1-AS12, AS5A, AS9A
VHF Italy A-H, H1, H2
VHF Ireland I1-I9
VHF South Africa 1-13
UHF U21-U69
UHF Australia AU28-AU69
Australia Optus 01-058
Custom channels can be included manually by specifying the frequency in megahertz:
<station name="2" active="1" position="0"
band="Custom" channel="55.69MHz"/>
norm A per-channel norm can be specified in the stationlist. This is for stations which receive both PAL and SECAM stations, such that
they can choose the colour encoding format per-channel. The only valid values here are either PAL or SECAM.
network
Sets the name of the network for the OSD display. In NTSC regions, this is set from the XDS information in the VBI if VBI decoding
is enabled.
call Sets the call letters of the network for the OSD display. In NTSC regions, this is set from the XDS information in the VBI if VBI
decoding is enabled.
xmltvid
Sets the XMLTV channel identifier to associate this channel with if tvtime cannot automatically make the association. For following
channel definition in an XMLTV file:
<channel id="I10119.labs.zap2it.com">
<display-name>CICA</display-name>
<display-name>TV Ontario (CICA)</display-name>
<display-name>Canadian Independent</display-name>
</channel>
An associated stationlist entry would be:
<station name="2" active="1" position="0"
band="Custom" channel="55.69MHz"
xmltvid="I10119.labs.zap2it.com"/>
AUTHORS
Achim Schneider, Billy Biggs.
SEE ALSO tvtime(1), tvtime-command(1), tvtime-scanner(1), tvtime.xml(5).
tvtime 1.0RC1 October 2004 stationlist.xml(5)