That tweak is incorrect, if I understand the modification to f2 correctly. If the second field is greater than the third, then it instead of being treated as the beginning index of the substring, it should be considered the end index (and the interpretation of the third field should be complementarily swapped). The correct solution requires that the second argument to substr() be modified as well, since in the case of $2 > $3, it should be $3 not $2.
By the way, malcomeex999 and rdcwayx, thank you very much for your bit awards. It's appreciated
Hi, patrick87:
One solution to handle both cases (even if they appear within the same file2):
It works identically to my earlier solution except that it tests the second and third fields in f2. If the first index is greater than the second, their values are swapped before the substr() call.
My input:
Data name: ABC001
Data length: 1000
Detail info
Data Direction Start_time End_time Length
1 forward 10 100 90
1 forward 15 200 185
2 reverse 50 500 450
Data name: XFG110
Data length: 100
Detail info
Data Direction Start_time End_time Length
1 forward 50 100 50 ... (11 Replies)
Dear all-
I have a requirement to send an email via email with body content which looks something below-
Email body contents
--------------------
RequestType: Update
DateAcctOpened: 1/5/2010
Note that header information and data content should be normal text..
Please advice on... (5 Replies)
Hi all,
I am working on a small prog..
i have a file.txt which contains random data...
K LINES V4 ADD CODE `COMPANY` ADD CODE `DISTRIBUTOR` SEQ NAME^K LINES V5 SEQ NAME^K LINES V6 ADD `PACK-LDATE` SEQ NAME^K^KCOMMAND END^KHEADINFO... (1 Reply)
oggz-chop(1) General Commands Manual oggz-chop(1)NAME
oggz-chop -- Extract the part of an Ogg file between given start and/or end times.
SYNOPSIS
oggz-chop [-o filename | --output filename ] [-s start_time | --start start_time ] [-e end_time | --end end_time ] [-k | --no-skele-
ton ] filename
oggz-chop [-h | --help ] [-v | --version ]
Description
oggz-chop chops a section of an Ogg file. It correctly interprets the granulepos timestamps of Ogg CELT, CMML, Dirac, FLAC, Kate, PCM,
Speex, Theora and Vorbis bitstreams. Run oggz-known-codecs(1) for a full list of codecs known by the installed version of oggz.
The output file contains copies of the headers of the input file, and all the codec data required to correctly decode the content between
the start and end times specified on the commandline. For codecs with data dependencies like video keyframes, the keyframe prior to the
starting time will be included in the output.
Note that oggz-chop operates by copying pages of Ogg data; it does not strip partial packets from the first or last data page included in
the output. It does however ensure to set the end of stream flag on the last page of each logical bitstream.
Skeleton handling: By default, the output will contain a Skeleton track specifying the start of the chop as presentation time.
Options
oggz-chop accepts the following options:
Output options
-o filename, --output filename
Write output to the specified filename instead of printing it to standard output.
-s start_time, --start start_time
Specify the start time of the chopped section to output.
-e end_time, --end end_time
Specify the end time of the chopped section to output.
-k , --no-skeleton
Do NOT include a Skeleton bitstream in the output.
-h, --help
Display usage information and exit.
-v, --version
Output version information and exit.
EXAMPLES
Extract the first minute of file.ogx:
oggz chop -e 1:00 file.ogx
Extract from the second to the fifth minute of file.ogx:
oggz chop -s 2:00 -e 5:00 -o output.ogx file.ogx
Extract, specifying SMPTE-25 frame offsets:
oggz chop -s smpte-25:00:02:03::12 -e smpte-25:00:05:02::04 -o output.ogv file.ogv
Server configuration
The following configuration for Apache httpd will enable oggz-chop. As with most Apache directives, this may of course be restricted to
particular Directories or Locations:
ScriptAlias /oggz-chop /usr/bin/oggz-chop
Action application/ogg /oggz-chop
HTTP/1.1 Cacheability
oggz-chop generates Last-Modified HTTP headers, and responds correctly to If-Modified-Since conditional GET requests.
AUTHOR
Conrad Parker February 25, 2008;
COPYRIGHT
Copyright (C) 2008 Annodex Association
SEE ALSO oggz-validate(1), oggz-merge(1), oggz-dump(1), hogg(1)oggz-chop(1)