Sponsored Content
Full Discussion: make loop from input file
Top Forums Shell Programming and Scripting make loop from input file Post 302723881 by Don Cragun on Wednesday 31st of October 2012 12:46:28 AM
Old 10-31-2012
Check the man page on your system for the xargs utility.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need help with using input file in the while loop

here's my code: ls -lt | /usr/bin/egrep `date +"%Y%m%d(05|06|07|08|09|10|11|12|13|14|15|16|17|18|19)"` | \ /usr/bin/egrep -i .dat | /usr/bin/awk '{print $9}' > $LockboxFile1 if ] then ... (2 Replies)
Discussion started by: sytycd712
2 Replies

2. HP-UX

How to make a loop base on reading a file?

Need help on making a loop script base on what is inside a file... File to read: List.txt List.txt contains below w/c are file name as well: SAMPLEa SAMPLEb SAMPLEc SAMPLEd SAMPLEe SAMPLEf . . . Want to make a loop that will manipulate those that are inside the file.txt w/c are... (3 Replies)
Discussion started by: JohnBalayo
3 Replies

3. UNIX for Dummies Questions & Answers

How to make a loop base on reading a file?

To make it clearer: I have a file, List.txt List.txt contains: (these are actually splitted files w/c I got from ls command and dump them to the List.txt file) SAMPLEa SAMPLEb SAMPLEc SAMPLEd SAMPLEe SAMPLEf . . . . . And I want to rename these files to have a .dat extension.... (3 Replies)
Discussion started by: JohnBalayo
3 Replies

4. Shell Programming and Scripting

Problem taking input from file with for loop

I am trying to take input from a file and direct it into a bash script. This script is meant to be a foreach loop. I would like the script to process each item in the list one by one and direct the output to a file. # cat 1loop #!/bin/bash # this 2>&1 to redirect STDERR & STDOUT to file... (4 Replies)
Discussion started by: bash_in_my_head
4 Replies

5. UNIX for Dummies Questions & Answers

make 1 new file using records of 5 input files

can you make me an awk script that will: read the 1st record from each input file, file1 file2 file3 file4 and file5 and write them to file6. then..... read the 2nd record from each input file, file1 file2 file3 file4 and file5 and append them to file6. then..... read the 3rd record... (1 Reply)
Discussion started by: kenneth.mcbride
1 Replies

6. Shell Programming and Scripting

How to make AWK process an input file many many times?

By "many many times" I mean the times the input file is to be processed is unknown beforehand, it will be known when awk finishes processing the input file for the first time. So my question is: how to start over again from the first record of the input file when AWK finishes processing the... (7 Replies)
Discussion started by: kevintse
7 Replies

7. Shell Programming and Scripting

matching user input to a text file loop?

until do read -p "Invalid cars. Try againa" cars1 done Ok i have the above code, im getting users input and if it doesnt match in the file the user has to try again untill its correct But when i run this it gives me an error saying ./Cars.bash: line 43: (2 Replies)
Discussion started by: gangsta
2 Replies

8. Homework & Coursework Questions

Loop to Convert a list from an input file and output it to another file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: A) Write a script, which will take input from a file and convert the number from Centigrade to Fahrenheit... (5 Replies)
Discussion started by: AliTheSnake
5 Replies

9. Shell Programming and Scripting

Use while loop to read file and use ${file} for both filename input into awk and as string to print

I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix. I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice. Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

10. UNIX for Beginners Questions & Answers

How to make a loop to read the input from a file part by part?

Hi All, We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Discussion started by: arun_adm
6 Replies
bup-margin(1)						      General Commands Manual						     bup-margin(1)

NAME
bup-margin - figure out your deduplication safety margin SYNOPSIS
bup margin [options...] DESCRIPTION
bup margin iterates through all objects in your bup repository, calculating the largest number of prefix bits shared between any two entries. This number, n, identifies the longest subset of SHA-1 you could use and still encounter a collision between your object ids. For example, one system that was tested had a collection of 11 million objects (70 GB), and bup margin returned 45. That means a 46-bit hash would be sufficient to avoid all collisions among that set of objects; each object in that repository could be uniquely identified by its first 46 bits. The number of bits needed seems to increase by about 1 or 2 for every doubling of the number of objects. Since SHA-1 hashes have 160 bits, that leaves 115 bits of margin. Of course, because SHA-1 hashes are essentially random, it's theoretically possible to use many more bits with far fewer objects. If you're paranoid about the possibility of SHA-1 collisions, you can monitor your repository by running bup margin occasionally to see if you're getting dangerously close to 160 bits. OPTIONS
--predict Guess the offset into each index file where a particular object will appear, and report the maximum deviation of the correct answer from the guess. This is potentially useful for tuning an interpolation search algorithm. --ignore-midx don't use .midx files, use only .idx files. This is only really useful when used with --predict. EXAMPLE
$ bup margin Reading indexes: 100.00% (1612581/1612581), done. 40 40 matching prefix bits 1.94 bits per doubling 120 bits (61.86 doublings) remaining 4.19338e+18 times larger is possible Everyone on earth could have 625878182 data sets like yours, all in one repository, and we would expect 1 object collision. $ bup margin --predict PackIdxList: using 1 index. Reading indexes: 100.00% (1612581/1612581), done. 915 of 1612581 (0.057%) SEE ALSO
bup-midx(1), bup-save(1) BUP
Part of the bup(1) suite. AUTHORS
Avery Pennarun <apenwarr@gmail.com>. Bup unknown- bup-margin(1)
All times are GMT -4. The time now is 06:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy