03-29-2012
No. Its doesn't exit the loop even after the changes.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
#!/bin/csh
I'm using a `while(1)` loop to dispaly real-time information about various files on my system, and I use ^C to exit it when needed. I was hoping there was a way to exit the script on a normal keystroke such as "q". Can someone point me in the right direction? I'm willing to use a... (7 Replies)
Discussion started by: seg
7 Replies
2. Shell Programming and Scripting
i wrote a while script as part of a huge program. this script, once picked, begins to output data to the person using it. pretty easy, as the person doesn't have to keep typing commands to get the output that the while loop automatically throws out.
now, the thing is, while this while-script... (3 Replies)
Discussion started by: Terrible
3 Replies
3. Shell Programming and Scripting
Hi All,
Can someone let me know how i can exit a for loop without exiting the script itself .... will the break statement work ....
please help ....
-Regards (2 Replies)
Discussion started by: Rohini Vijay
2 Replies
4. Shell Programming and Scripting
Hi guys,
I'm new to unix but loving it!! BUT this is driving me nuts as i can't work out the best way to do it.
I have a while true loop that i use to monitor something. For my own reasons in ths script i have disabled the CTRL C using the trap command. But i want to put in a option to exit... (5 Replies)
Discussion started by: Noob e
5 Replies
5. Shell Programming and Scripting
im running a while loop as a file watcher, with incremental counter on the retries..however when the retries reach it's limit i want it exit and echo and error and stop the batch. Im not sure the code i have will do that already...
Here is what i have that works:
#!/usr/bin/ksh
count=0... (2 Replies)
Discussion started by: sigh2010
2 Replies
6. Shell Programming and Scripting
I am trying to get my program to exit when the answer to my question is positive, if I am asking if the answers are correct in the entries that the user inputted and the user says no how do I then have it exit? If they say everything is correct then it continue into the program, I think I am close... (2 Replies)
Discussion started by: gumbi17
2 Replies
7. Shell Programming and Scripting
hi,
how to exit from "if" loop?actually i have mutliple "if" conditions, i have to exit from each "if" loop,if it is true...:confused:
Please suggest me... (3 Replies)
Discussion started by: sreelu
3 Replies
8. Shell Programming and Scripting
Hi
I would like to exit the loop below on <Enter> even if it sleeps. Is it possible?
while true
do
my_procedure;
sleep 60
done
Thanks (7 Replies)
Discussion started by: zam
7 Replies
9. Shell Programming and Scripting
This code is used to check for duplicate ip and hostnames in an /etc/hosts file
CENTRAL is path to /etc/hosts
AWK =awk
#check CENTRAL for duplicate ips or hostnames#
grep -v "^#" $CENTRAL | $AWK '{ print $1, $2; }' | \
while read ip hostname
do
if... (5 Replies)
Discussion started by: trimike
5 Replies
10. UNIX for Beginners Questions & Answers
Hi Folks -
Here is a for loop I've created and I just wanted to see if this was okay practice:
for M in NAME1 NAME1 NAME3
do
echo "Executing MaxL:" $M >>${_LOGFILE} 2>&1
. ${_STARTMAXLPATH}startmaxl.sh ${_MAINPATH}${_MAXLPATH}$M.mxl
_RC=$?
if
then
... (7 Replies)
Discussion started by: SIMMS7400
7 Replies
LEARN ABOUT DEBIAN
bup-margin
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)