Sponsored Content
Full Discussion: File Handling
Top Forums UNIX for Dummies Questions & Answers File Handling Post 302760945 by Yoda on Thursday 24th of January 2013 10:28:07 PM
Old 01-24-2013
Code:
split -d -l 1000 filename filename_out

head -1 filename > header
tail -1 filename > trailer

for file in filename_out*
do
   cat header ${file} trailer > tmp
   mv tmp ${file}
done

 

10 More Discussions You Might Find Interesting

1. Programming

File Handling in C

Hi all, I have a problem in handling files through C. here is the problem im having: i will query the database (for instance consider employees table ) for empno,ename,job,salary fields.The query returns me some 100 of rows. now i need to place them in a file in row wise pattern as they... (3 Replies)
Discussion started by: trinath
3 Replies

2. Programming

file handling

Hi all, I got a little issue here. Imagine that I have more than one process accessing one file. Is it possible to know which process(es) are accessing that file when I open the file?? Thanks for the help. Best regards, Ernesto (2 Replies)
Discussion started by: ninjanesto
2 Replies

3. UNIX for Advanced & Expert Users

File Handling

Hi, I have a log file which runs into 3 to 5 GB. We store this typically for 6 months. When a new month starts we move the previous month into a 9 month back up log (file.9m) and delete the last month of the 9 month back up. Iam using awk to find the data and cat to join the files like... (3 Replies)
Discussion started by: baanprog
3 Replies

4. UNIX for Advanced & Expert Users

please help me in file handling

sir i have to get first line from a file for example >cat file1 abc zxc asd adsf from that file1 i need only first line expected result >abc please help me ! (1 Reply)
Discussion started by: ponmuthu
1 Replies

5. UNIX for Advanced & Expert Users

File handling

my input for a script is another csv file but in that file say 7 lines are there ... how can i get line by line to that input for example : >cat link.csv www.yahoo.com,yahoo www.google.com,google www.unix.com,unix another file in that file i need to ping the above links ... (2 Replies)
Discussion started by: ponmuthu
2 Replies

6. Shell Programming and Scripting

UNIX File handling -Issue in reading a file

I have been doing automation of daily check activity for a server, i have been using sqls to retrive the data and while loop for reading the data from the file for several activities. BUT i got a show stopper the below one.. where the data is getting store in $temp_file, but not being read by while... (1 Reply)
Discussion started by: KuldeepSinghTCS
1 Replies

7. Programming

Perl help for file handling

$# some text $$ some text $@ some text $$. some text Mg1 some text Mg2 some text . . . Mg10 some text The above 10 lines are to be extracted except the lines starting from $#,$$.,... (4 Replies)
Discussion started by: baig.abdul
4 Replies

8. Shell Programming and Scripting

ksh file handling

Specifically on RHEL 5.7. When does the underlying ksh process open and close files? Every time they're accessed, or as little as possible? Say you have some script like: CreateFiles() { grep "<VALUE1>" ${infile} >> ${outfile} grep "<VALUE2>" ${infile} >> ${outfile} ...... (4 Replies)
Discussion started by: CarloM
4 Replies

9. UNIX for Dummies Questions & Answers

File handling

I have a file 1 298167 298168 1093209 1093210 1422663 I want to write a code where in I want to read contents of above file like first read is 1 second read is 298167 Substract second read from first and if this is greater than or less than 99,999. Similarly I want to traverse thru... (3 Replies)
Discussion started by: Guru148
3 Replies

10. Shell Programming and Scripting

File handling

Hi All, I need to extract the data from the text file. The data of the text file is shown below #L 0.000017 4.329939 0.000017 4.716267 r7.9 P 1 1;Net=IN32 The extracted data should be IN32. Could anyone help to script in c shell.? (4 Replies)
Discussion started by: gopishrine
4 Replies
qwavcut(1)							 quelcom man pages							qwavcut(1)

NAME
qwavcut - extract and/or delete parts of a wav file SYNOPSIS
qwavcut [option]... file DESCRIPTION
qwavcut allows to extract and/or delete a fragment of a wav 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 samples contained in the specified cut will be copied. -V, --version show version and exit. CUT OPTIONS
cut options are used to specify at which sample 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 sample and ends at the last sample; there's no default value for size. all the values are treated as a sample number unless a format specifier is used. see the FORMATS section below for information. all values must be positive integer. -b <begin>[<format>], --set-begin-from-eof=<begin>[<format>] begin specifies the first sample 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 sample 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 sample 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 sample 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 samples 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 samples. since most of the times will be difficult to specify a cut in terms of samples, 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 samples. EXAMPLES
here are some examples: to get the last ten seconds of a file: qwavcut -b 10s -o outfile.wav infile.wav four ways of getting the first minute of a file: qwavcut -S -1:0 -o outfile.wav infile.wav qwavcut -S -60 -o outfile.wav infile.wav qwavcut -E 1m -o outfile.wav infile.wav qwavcut -s 1m -o outfile.wav infile.wav four ways of getting the second quarter of a file: qwavcut -S 15:0-30:0 -o outfile.wav infile.wav qwavcut -B 15m -E 30m -o outfile.wav infile.wav qwavcut -s 15m -E 30m -o outfile.wav infile.wav qwavcut -B 15m -s 15m -o outfile.wav infile.wav NOTES
if neither the options --output nor --delete are specified, the program will do nothing. when cutting at the end, a simple truncate call is needed. but when cutting in the middle or in the beginning, all the data behind the cut must be moved ahead and, depending on the amount of the data to be moved, this can be a time consuming operation. BUGS
tests has been done only with 44100 Hz 16 bit stereo files, though it may work with mono/stereo 8/16 bits files. AUTHOR
dmanye@etse.urv.es http://www.etse.urv.es/~dmanye/quelcom/quelcom.html SEE ALSO
qwavinfo(1), qwavjoin(1), qwavsilence(1), qwavfade(1), qwavheaderdump(1) qmp3info(1), qmp3join(1), qmp3cut(1), qmp3check(1), qmp3report(1) quelcom 0.4.0 february 2001 qwavcut(1)
All times are GMT -4. The time now is 09:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy