04-30-2009
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I get a text file with 70+ columns (seperated by Tab) and about 10000 rows. The 58th Column is all numbers. But sometimes 58th columns has "/xxx=##" after the numeric data. I want to truncate this string using the script. Any Ideas...:confused: (3 Replies)
Discussion started by: gagansharma
3 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
I have a script that scan files, find old templet and replace it with new one.
#!/bin/ksh
file_name=$1
old_templet=$2
new_templet=$3
# Loop through every file like this
for file in file_name
do
cat $file | sed "s/old_templet/new_templet/g" > $file.new
#do a global searce and... (8 Replies)
Discussion started by: amir_yosha
8 Replies
3. UNIX for Dummies Questions & Answers
Hey, I want to have a C program which, for an existing file supplied by the command line argument (E.g. File1.txt) replaces all the occurrences of the words:
"We” or “we” by “I”
“a” by “the”
“A” by “The”.
Then print the replaced file. All other characters of the file are to be left... (1 Reply)
Discussion started by: IwishIknewC
1 Replies
4. UNIX for Dummies Questions & Answers
I want to carry out search & replace for the paths mentioned in the file with the help of vi.
'abc/' to be replaced by 'abc/data'
When I use command in vi as below -
%s/abc//abc/data/g
it gives me an error.
How we should deal with '/' part in string for vi search & replace?
... (6 Replies)
Discussion started by: videsh77
6 Replies
5. Shell Programming and Scripting
Looking for a way using sed/awk/perl to replace port numbers in a file with an incrementing number. The original file looks like...
Host cmg-iqdrw3p4
LocalForward *:9043 localhost:9043
Host cmg-iqdro3p3a
LocalForward *:10000 localhost:10000
Host cmg-iqdro3p3b
LocalForward... (2 Replies)
Discussion started by: treadwm
2 Replies
6. Shell Programming and Scripting
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies
7. Shell Programming and Scripting
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Discussion started by: spfc_dmt
12 Replies
8. Shell Programming and Scripting
Hi All,
i am trying to replace a string & its current value (P_JOBID =1000 for eg) in a file with a new value(P_JOBID =2000) through sed command.
File name : A.txt
Command I am trying :
`cat $path/A.txt | grep ${P_JOBID} | sed -e s/P_JOBID=/P_JOBID="$JobID"/g`
Output Expected :... (5 Replies)
Discussion started by: dsfreddie
5 Replies
9. UNIX for Dummies Questions & Answers
Hi
I am looking to rename the contents of this dir, each one with a new timestamp, interval of a second for each so it the existing format is on lhs and what I want is to rename each of these to what is on rhs..hopefully it nake sense
CDR.20060505.150006.gb CDR.20121211.191500.gb... (3 Replies)
Discussion started by: rob171171
3 Replies
10. Shell Programming and Scripting
Hi,
Here's my dilemma.
I need to replace the string Sept_2012 to Oct_2012 in all *config.py files within the current directory and below directories
Is this possible?
Also I am trying to find all instances of the string Sept_2012 within files in the current directory and below
I have... (13 Replies)
Discussion started by: pure_jax
13 Replies
LEARN ABOUT DEBIAN
oggz-chop
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)