10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello all,
How can I find out the start and end of the writing file in the directory or recording time for writing file?
I have a directory where small ~ 1*MB temporary files are written.
After the end of the record, they are retrieved and erased.
I can only find out that the files are... (4 Replies)
Discussion started by: mrAibo
4 Replies
2. Shell Programming and Scripting
Can Someone please explain why BEGIN and END statement is used inside function? How does that help in scripting?
function fileformatting
{
CleanupMask="xXxX"
sed 's/^.//' < ${AllFile} > ${AllFile}.tmp
echo $(wc -l ${AllFile}.tmp)
`awk -v CleanupMask=${CleanupMask} '
BEGIN... (2 Replies)
Discussion started by: later_troy
2 Replies
3. Shell Programming and Scripting
Hello Friends ,
Please help to create script for compare and replace if not matches of set of lines .
* Primary*
Servername Server1
Location R201
Rack 4
*End Primary*
*Secondary*
Server Name Server1
IPAddress 10.24.30.10
Application Apache
*End of Secondary*
Above... (4 Replies)
Discussion started by: rnary
4 Replies
4. Shell Programming and Scripting
I'm new to awk, trying to understand the basics.
I'm trying to reset the counter everytime the program gets a new file to check.
I figured in the BEGIN part it would work, but it doesn't.
#!/bin/awk -f
BEGIN {counter=0}
{
sum=0
for ( i=1; i<=NF;... (1 Reply)
Discussion started by: guitarist684
1 Replies
5. Shell Programming and Scripting
I am trying to understand how to use the END block in awk without much success. I have this script that I found:
gawk '{count++; keyword = $1}
if (count == 3) keyword = "order this"
else print keyword " " k
}
}' << orderfile
Is that the way that the END block should be used? I am... (6 Replies)
Discussion started by: newbie2010
6 Replies
6. Shell Programming and Scripting
Hi All,
test file
Begin Script Run at Thu Mar 14 09:24:16 PDT 2013
tst_accounts: ws zip: WS_out_20130313.tar.gz dat: test_20130313.dat count: 63574 loaded: xx pre-merge: xx post-merge: xx timestamp: Thu Mar 14 09:30:42 PDT 2013
tst_accounts: ws zip: WS_out_20130313.tar.gz dat: s_20130313.dat... (6 Replies)
Discussion started by: bmk
6 Replies
7. Programming
Can any one help me out with following problem...
I want to search in a file which has two strings repeat each time(like start and end) i want to search between these two string in C programming.
please help me with the solution.
thanks in advance. (8 Replies)
Discussion started by: uday.sena.m
8 Replies
8. UNIX for Dummies Questions & Answers
Hi All ,
I am newbie to linux shell scripting , below are the contents of my log file ,
i want the lines between a begin pattern and a end pattern
for an instance , my begin Pattern is "Transaction Begins for Usr"
and end pattern is "Transaction Ends for Usr" into another file
Sample file... (1 Reply)
Discussion started by: SARAVANANE
1 Replies
9. Shell Programming and Scripting
Hi
I have written a script .The script runs properly if i write sql queries .But if i use PLSQL commands of BEGIN if end if , end ,then on running the script the comamds are getting printed on the prompt .
Ex :temp.sql
After connecting to the databse at the sql prompt i type... (1 Reply)
Discussion started by: isha_1
1 Replies
10. Shell Programming and Scripting
Why would you need to use this in a script?
Why can't you just use print to print out what you want printed in the begining and print for what you want at the end.
So this:
nawk 'BEGIN {print "this is the first line"}
{print $1 $2 $3}
{print $5 $6}
END {print "this is the last line"}'
... (2 Replies)
Discussion started by: llsmr777
2 Replies
qmp3cut(1) quelcom man pages qmp3cut(1)
NAME
qmp3cut - extract and/or delete parts of a mp3 file
SYNOPSIS
qmp3cut [option]... file
DESCRIPTION
qmp3cut allows to extract and/or delete a fragment of a mp3 file. some parameters must be supplied in order to define the start/size/end
cut points and what to do then: either the fragment must be copied to another file or erased from the file (or both)
GENERAL OPTIONS
-d, --delete
deletes the fragment from the file. if option --output is used, deletion action is always done after fragment extraction.
-h, --help
show a brief help and exit.
-o <outfile>, --output=<outfile>
outfile is the file where the frames contained in the specified fragment will be copied.
-v, --verbose
verbose.
-V, --version
show version and exit.
CUT OPTIONS
cut options are used to specify at which frame the fragment begins (options -b or -B), ends (options -e and -E), or which size it has
(option -s). at least, one cut option must be specified. neither the options -b and -B, and the options -e and -E can be used together;
also, a begin, end and size option can be used at the same time.
by default, the fragment begins at the first frame and ends at the last frame; there's no default value for size.
all the values are treated as a frame number unless a format specifier is used. see the FORMATS section below for information. values must
be positive integer.
-b <begin>[<format>], --set-begin-from-eof=<begin>[<format>]
begin specifies the first frame of the file that belongs to the cut counting from the end of the file.
-B <begin>[<format>], --set-begin=<begin>[<format>]
begin specifies the first frame of the file that belongs to the cut counting from the beginning of the file.
-e <end>[<format>], --set-end-from-eof=<end>[<format>]
end specifies the last frame of the file that belongs to the cut counting from the end of the file.
-E <end>[<format>], --set-end=<end>[<format>]
end specifies the last frame of the file that belongs to the cut counting from the beginning of the file.
-s <size>[<format>], --set-size=<size>[<format>]
size specifies the number of frames contained in the cut.
-S <begin>-<end>, --slice <begin>-<end>
slice specifies the starting and ending points of the cut as a timeslice, which is to say, two time specifications ([[h:]m:]s[.ms])
joined by a hyphen.
FORMATS
cut options can have also an optional modifier. if this modifier is not used, then the value provided with the corresponding cut option
will be interpreted as a number of frames. since most of the times will be difficult to specify a cut in terms of frames, the following
modifiers are provided:
j value is interpreted as milliseconds.
m value is interpreted as minutes.
s value is interpreted as seconds.
b value is interpreted as bytes.
k value is interpreted as kbytes (1024 bytes).
M value is interpreted as megabytes (1024 kbytes).
in either case, the values specified will be rounded to get an integer number of frames.
EXAMPLES
here are some examples:
to get the last ten seconds of a file:
qmp3cut -b 10s -o outfile.mp3 infile.mp3
two ways of getting the first minute of a file:
qmp3cut -E 1m -o outfile.mp3 infile.mp3
qmp3cut -s 1m -o outfile.mp3 infile.mp3
three ways of getting the second quarter of a file:
qmp3cut -S 15:0-30:0 -o outfile.mp3 infile.mp3
qmp3cut -B 15m -E 30m -o outfile.mp3 infile.mp3
qmp3cut -s 15m -E 30m -o outfile.mp3 infile.mp3
qmp3cut -B 15m -s 15m -o outfile.mp3 infile.mp3
NOTES
if neither the options --output nor --delete are specified, the program will do nothing.
BUGS
usually, the mpg123 player (and any other app mp3-read capable) report messages in the way like "cannot rewind by XXX bytes" where XXX is a
negative value on streams extracted with qmp3cut. this is due to frame dependency (frame decoding depends sometimes of neighbourhood frames
when bit reservoir technique is used at encoding time) and possibly will be corrected in a (near?) future.
there's no support for variable bit rate (vbr) files.
tests have been done only with mpeg version 1 layer iii streams, though it may (or not) work with other versions/layers.
AUTHOR
dmanye@etse.urv.es
http://www.etse.urv.es/~dmanye/quelcom/quelcom.html
SEE ALSO
qmp3info(1), qmp3join(1), qmp3check(1), qmp3report(1)
qwavinfo(1), qwavjoin(1), qwavcut(1), qwavsilence(1), qwavfade(1), qwavheaderdump(1)
quelcom 0.4.0 february 2001 qmp3cut(1)