Sponsored Content
Full Discussion: Reading Files
Top Forums UNIX for Dummies Questions & Answers Reading Files Post 302129485 by matrixmadhan on Tuesday 31st of July 2007 07:28:44 AM
Old 07-31-2007
Looking for something like this,

reading contents from a file between lines 100 and 200

Code:
awk ' NR >= 100 && NR <= 200 ' filename

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

reading gz files

Hi, I have a simple perl script where I am passing array of gziped files to the while loop and trying to read content of each field one line at the time using gzcat. Yet, I can not get it to work Here is what I am doing ... while ($filename=shift) { open(MYFILE, "| gzcat $filename"); ... (2 Replies)
Discussion started by: arushunter
2 Replies

2. UNIX for Dummies Questions & Answers

reading .bin files

Is there a command to reading the contents of files with .bin extension? (1 Reply)
Discussion started by: eastcoast_uix
1 Replies

3. Solaris

Reading Files In

I'm looking to write a script where i look in a file called files.txt. This file has a list of other files in there. I want the script to be able to look at this files.txt and go off and find the files that are listed in another directory. I am doing it this way as filenames change week in... (1 Reply)
Discussion started by: Pablo_beezo
1 Replies

4. Shell Programming and Scripting

reading two files

Hi, I have 2 files file 1 ---- 10013 This is a text 10014 This is a test 10015 This is a temp file 2 ---- 10013 010014737 ADSM 1300004 E 10014 020012323 ABCD 1718888 E 10015 030121212 ADSW 1290991 E need to compare column1 in... (2 Replies)
Discussion started by: injeti
2 Replies

5. Shell Programming and Scripting

reading from 2 files through while loop

hi i have two files cat input.txt 123456| 43256 456482|5893242 cat data.txt xv 123456 abcd dsk sd 123456 afsfn dd df 43256 asdf ff ss 456482 aa sf 5893242 ff ff aa 5893242 aa aa i need to read inputs from input.txt and find data for data.txt. then i need to print them as a... (2 Replies)
Discussion started by: windows
2 Replies

6. Shell Programming and Scripting

Reading input files

Okay, so I've looked on here and found some similar things, but not exactly what I am looking for. I am working on creating a script that can back up some files, based on the contents of another file - the configuration file. First file contains the files to back up - we'll call this... (1 Reply)
Discussion started by: pdxwarrior
1 Replies

7. Shell Programming and Scripting

reading multiple files

Hello I have a requirement where i have to loop through certain directory which will have multiple files. After looping through i have to make a list of file names exisitng in the directory and write them to a sequental file and each file should be delimited by ^%^ i.e If i have 3 files A,... (3 Replies)
Discussion started by: dsdev_123
3 Replies

8. Shell Programming and Scripting

Reading extension of files

Hi, I need a command to read extension of files. Could anyone please help me? (14 Replies)
Discussion started by: priyadarshini
14 Replies

9. Shell Programming and Scripting

reading from 2 files using awk

hi, Is it possible to read and compare 2 files which have different Field separators at the same time using awk??? file1: 1,dayal,maruti,Z-234,bangalore,KA,........ 2,yash,esteem,Y-007,delhi,DL,........... . . . fill 2: Z-234|Registered|Bangalore Y-007|Registered|Bangalore . . . ... (2 Replies)
Discussion started by: VGR
2 Replies

10. UNIX for Dummies Questions & Answers

Need Help in reading N days files from a Directory & combining the files

Hi All, Request your expertise in tackling one requirement in my project,(i dont have much expertise in Shell Scripting). The requirement is as below, 1) We store the last run date of a process in a file. When the batch run the next time, it should read this file, get the last run date from... (1 Reply)
Discussion started by: dsfreddie
1 Replies
bup-midx(1)						      General Commands Manual						       bup-midx(1)

NAME
bup-midx - create a multi-index (.midx) file from several .idx files SYNOPSIS
bup midx [-o outfile] <-a|-f|idxnames...> DESCRIPTION
bup midx creates a multi-index (.midx) file from one or more git pack index (.idx) files. Note: you should no longer need to run this command by hand. It gets run automatically by bup-save(1) and similar commands. OPTIONS
-o, --output=filename.midx use the given output filename for the .midx file. Default is auto-generated. -a, --auto automatically generate new .midx files for any .idx files where it would be appropriate. -f, --force force generation of a single new .midx file containing all your This will result in the fastest backup performance, but may take a long time to run. --dir=packdir specify the directory containing the .idx/.midx files to work with. The default is $BUP_DIR/objects/pack and $BUP_DIR/indexcache/*. --max-files maximum number of .idx files to open at a time. You can use this if you have an especially small number of file descriptors avail- able, so that midx can complete (though possibly non-optimally) even if it can't open all your .idx files at once. The default value of this option should be fine for most people. --check validate a .midx file by ensuring that all objects in its contained .idx files exist inside the .midx. May be useful for debugging. EXAMPLE
$ bup midx -a Merging 21 indexes (2278559 objects). Table size: 524288 (17 bits) Reading indexes: 100.00% (2278559/2278559), done. midx-b66d7c9afc4396187218f2936a87b865cf342672.midx DISCUSSION
By default, bup uses git-formatted pack files, which consist of a pack file (containing objects) and an idx file (containing a sorted list of object names and their offsets in the .pack file). Normal idx files are convenient because it means you can use git(1) to access your backup datasets. However, idx files can get slow when you have a lot of very large packs (which git typically doesn't have, but bup often does). bup .midx files consist of a single sorted list of all the objects contained in all the .pack files it references. This list can be binary searched in about log2(m) steps, where m is the total number of objects. To further speed up the search, midx files also have a variable-sized fanout table that reduces the first n steps of the binary search. With the help of this fanout table, bup can narrow down which page of the midx file a given object id would be in (if it exists) with a single lookup. Thus, typical searches will only need to swap in two pages: one for the fanout table, and one for the object id. midx files are most useful when creating new backups, since searching for a nonexistent object in the repository necessarily requires searching through all the index files to ensure that it does not exist. (Searching for objects that do exist can be optimized; for exam- ple, consecutive objects are often stored in the same pack, so we can search that one first using an MRU algorithm.) SEE ALSO
bup-save(1), bup-margin(1), bup-memtest(1) BUP
Part of the bup(1) suite. AUTHORS
Avery Pennarun <apenwarr@gmail.com>. Bup unknown- bup-midx(1)
All times are GMT -4. The time now is 06:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy