Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tv_sort(1p) [debian man page]

TV_SORT(1p)						User Contributed Perl Documentation					       TV_SORT(1p)

NAME
tv_sort - Sort XMLTV listings files by date, and add stop times. SYNOPSIS
tv_sort [--help] [--by-channel] [--output FILE] [FILE...] DESCRIPTION
Read XMLTV data and write out the same data sorted in date order. Where stop times of programmes are missing, guess them from the start time of the next programme on the same channel. For the last programme of a channel, no stop time can be added. Tv_sort also performs some sanity checks such as making sure no two programmes on the same channel overlap. --output FILE write to FILE rather than standard output --by-channel sort first by channel id, then by date within each channel. --duplicate-error If the input contains the same programme more than once, consider this as an error. Default is to silently ignore duplicate entries. The time sorting is by start time, then by stop time. Without --by-channel, if start times and stop times are equal then two programmes are sorted by internal channel id. With --by-channel, channel id is compared first and then times. You can think of tv_sort as converting XMLTV data into a canonical form, useful for diffing two files. EXAMPLES
At a typical Unix shell or Windows command prompt: tv_sort <in.xml >out.xml tv_sort in.xml --output out.xml These are different ways of saying the same thing. AUTHOR
Ed Avis, ed@membled.com perl v5.14.2 2006-03-02 TV_SORT(1p)

Check Out this Related Man Page

TV_EXTRACTINFO_EN(1p)					User Contributed Perl Documentation				     TV_EXTRACTINFO_EN(1p)

NAME
tv_extractinfo_en - read English-language listings and extract info from programme descriptions. SYNOPSIS
tv_extractinfo_en [--help] [--output FILE] [FILE...] DESCRIPTION
Read XMLTV data and attempt to extract information from English-language programme descriptions, putting it into machine-readable form. For example the human-readable text '(repeat)' in a programme description might be replaced by the XML element <previously-shown>. --output FILE write to FILE rather than standard output This tool also attempts to split multipart programmes into their constituents, by looking for a description that seems to contain lots of times and titles. But this depends on the description following one particular style and is useful only for some listings sources (Ananova). If some text is marked with the 'lang' attribute as being some language other than English ('en'), it is ignored. SEE ALSO
xmltv(5). AUTHOR
Ed Avis, ed@membled.com BUGS
Trying to parse human-readable text is always error-prone, more so with the simple regexp-based approach used here. But because TV listing descriptions usually conform to one of a few set styles, tv_extractinfo_en does reasonably well. It is fairly conservative, trying to avoid false positives (extracting 'information' which isn't really there) even though this means some false negatives (failing to extract information and leaving it in the human-readable text). However, the leftover bits of text after extracting information may not form a meaningful English sentence, or the punctuation may be wrong. On the two listings sources currently supported by the XMLTV package, this program does a reasonably good job. But it has not been tested with every source of anglophone TV listings. perl v5.14.2 2011-05-07 TV_EXTRACTINFO_EN(1p)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

file formatting ?

I have a log file with start and finish times for various scripts. The start and finish times just get appended one after the other. I want the start and finish times to be on the same line seperated by a comma. Below is an example of the log file I want formatted. logfile: 23:17:15 23:20:26... (16 Replies)
Discussion started by: cstovall
16 Replies

2. Programming

how to run socket programme and file management concurrently

hi i have a server socket programme which is running in HP/UX system and then need to add a function about refreshing memory every miniute because the socket programme is blocked , i have no idea about this what should i do thanks (10 Replies)
Discussion started by: benbenpig
10 Replies

3. UNIX for Dummies Questions & Answers

Unable to compile the c programme in unix

Hi, My name is vreddy and I am learning c language now and written one programme on vi editor. how do I compile the programme please give me some advice and that would be helpfull for me. thanks vre (10 Replies)
Discussion started by: vasudeva
10 Replies

4. Shell Programming and Scripting

Formatting a report from 2 files

I have 2 files with sample data enclosed. 1. GL (already sorted in ascending order by Gl number) Gl number*glname*Year*opening balance 1000*Interest Income*2006*100.00 1005*Rental Income*2006*0.00 ... 2. Transactions (file is not sorted on GL number or any other field) Branch*Year*Gl... (12 Replies)
Discussion started by: augustinep
12 Replies

5. IP Networking

HOw to start a connection?

Hi, I understand assignment qns are not allowed. However, I need major help.. please teach me how to write a tcp/ip programme using C, wad are the websites that i can refer to? wad are the codes required for it? I have never done tcp/ip configurations before, and never learnt C before,... (13 Replies)
Discussion started by: microuniz
13 Replies

6. UNIX for Dummies Questions & Answers

Sorting list of files per date column

Hi all, I have a pecular issue in sorting these files (not an ls -lrt) in Solaris environment. All the below files are modified on November 4th, but I want to sort these files as per date (eg: 01May07_1623 = ddmmmyy_hhmm) Nov 4 18:27 SONYELEC00.GI22973.01May07_1623.gpg Nov 4 18:27... (10 Replies)
Discussion started by: shivaastrogun
10 Replies

7. UNIX for Dummies Questions & Answers

how to add duplicate lines

Hi, I have a file that looks like this: a_X data a_Y data b data c data d_X data d_Y data I **want** to duplicate the lines without the _X and _Ys. In other words, I want it to look like this a_X data a_Y data b data b data c data c data d_X data d_Y data (13 Replies)
Discussion started by: mikey11415
13 Replies

8. Shell Programming and Scripting

Sort files by date in filename

Hi, I am a newbie to shell programming and I need some help in sorting a list of files in ascending order of date in the filenames. The file format is always : IGL01_AC_D_<YYYYMMDD>_N01_01 For example, in a directory MyDirectory I have the following files: IGL01_AC_D_20110712_N01_01.dat... (11 Replies)
Discussion started by: Yuggy
11 Replies

9. Shell Programming and Scripting

extract a pattern from a xml file

Hello All, I want to write a shell script for extracting a content from a xml file the xml file looks like this: <Variable name="moreAxleInfo"> <type> <Table> <type> <NamedType> <type> <TypeRef... (11 Replies)
Discussion started by: suvendu4urs
11 Replies

10. Shell Programming and Scripting

Add current date and time

i have file 1.txt asdas|csada|13|03|10|04|23|A1|canberra sdasd|sfdsf|13|04|26|23|28|A1|sydney i want to add today's date and time in the end of each row expected output asdas|csada|13|03|10|04|23|A1|canberra|130430|1358 sdasd|sfdsf|13|04|26|23|28|A1|sydney|130430|1358 todays date... (10 Replies)
Discussion started by: radius
10 Replies

11. Shell Programming and Scripting

Parsing xml - tricky one...need help!!

Hi, i am new to linux programming fraternity but looks like starting with a big thing... yes..xml parsing (it is indeed tough for a beginner like me) so need your kind help... The snippet of xml looks like: <snapshot> <tag1> <key>1234</key> <keytype>abcd</keytype> </tag1> <tag2>... (11 Replies)
Discussion started by: rookie2014
11 Replies

12. Shell Programming and Scripting

Grep number between Square [] brackets

I wanted to store the number inside the square bracket between colon( : ) and closing suqre bracket(]) in some variable. Suppose I have lines like : Input file : 20140320 00:08:23.846 INFO 84] - anything in line 20140320 00:08:23.846 Test 589] - Virtual and lab lab anything... (18 Replies)
Discussion started by: nes
18 Replies

13. Shell Programming and Scripting

Delete complete row according to condition

Gents, Please can you help me. In the range 4-24 column the values are duplicate some times and I will like to delete the fist occurrence and keep the last only. The file is not sorted and I can sorted because from column 75 to the end the file is increase by time.. I have a file like this... (10 Replies)
Discussion started by: jiam912
10 Replies

14. Shell Programming and Scripting

Date substring from a string

Hi, I have 2 statements in a file a.sh start time is Fri Jan 9 17:17:33 CST 2015 a.sh end time is Fri Jan 9 17:47:33 CST 2015 I am required to get only the time out of it. like 17:17:33 & 17:47:33 PLs suggest (21 Replies)
Discussion started by: usrrenny
21 Replies

15. Shell Programming and Scripting

Sort with conditions

Gents, I would like to sort the following file using this conditions. Key is column 1 and column 7, The conditions are: if column 3 > 1 the sort need to be in reverse otherwise no need to sort. if column 4 > 6,26 the sort need to be in reverse otherwise no need to sort. Using this... (13 Replies)
Discussion started by: jiam912
13 Replies