04-14-2012
Thank you. But can you tell me what's wrong with my code. I'd be really interested in that.
Edit: Solved. Looked closer to radoulov's syntax. You're my hero
Last edited by intelinside; 04-14-2012 at 12:46 PM..
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm nearly finished my program i've got everything in place and than when i run it it comes back with the reply mv: command not found. This is the code that seems to be causing the problem.
elif
then
echo "There are more than one '$1' files in the system."
echo "Please... (2 Replies)
Discussion started by: zoolz
2 Replies
2. Shell Programming and Scripting
hi forum
i beginning with script and i want test un null variable in a schell
i just don t know the syntax here is a litle example
y=test
echo $y
unset y
echo $y (so here Y = Null)
if Y=Null
then
echo "y is null"
exit
fi (1 Reply)
Discussion started by: kykyboss
1 Replies
3. HP-UX
hi folks,
i've got a blank hp visualize C3000 workstation and installed HP-UX 11.11. When I want to start X, I get the following error message:
# X
Fatal server error:
Couldn't open X pointer device! Is one attached?
I've connected an mouse and a keyboard with an usb/ps2 connector.... (5 Replies)
Discussion started by: grisu
5 Replies
4. Shell Programming and Scripting
korn shell
If
then
update_smartcare_user_password "$u_id"
else
echo "Not a database user"
fi
i get this error
Syntax error at line *** : `then' is not expected.
what should i do.
I want to check whether $a is null or not. (2 Replies)
Discussion started by: sachin.gangadha
2 Replies
5. Programming
Hey,
I'm currently getting into some kernel module progamming. As a little exercise I want to read the headers out of an ELF file. My code is very simple, here is the important part:
struct file *fp;
/* ... */
fp = filp_open("some/file/on/my/pc", O_RDONLY, 0);
if(fp == NULL) {
... (15 Replies)
Discussion started by: disaster
15 Replies
6. Shell Programming and Scripting
Hi.
Here is beginning of my script
#!/usr/local/bin/expect --
set timeout 15
spawn /usr/local/account.sh -n modify
expect "Password:" {send "mypassword\r"}
But due to some terminal control sequences (or something else, dunno exactly) my password prompt is looking like this:
and expect... (3 Replies)
Discussion started by: urello
3 Replies
7. Shell Programming and Scripting
Good afternoon,
I am tearing hair out over this. It should be so simple. I have an if statement to evaluate whether or not replication is working. I am testing variables from mysql to see if they are both "Yes". I have put some echo statements in to see how far the code proceeds. It always... (6 Replies)
Discussion started by: jimm
6 Replies
8. Shell Programming and Scripting
Hi ! :)
I made this :
#!/bin/bash
rsa_dir="/etc/openvpn/easy-rsa/"
rsa_key_dir="/etc/openvpn/easy-rsa/keys/"
ccd_dir="/etc/openvpn/ccd/"
regex_special_char=''
cd $rsa_dir
while
read -p "Please can you enter the vpn's username : " username
] || ] || ] || ]
do
echo "Your entry... (10 Replies)
Discussion started by: Arnaudh78
10 Replies
9. IP Networking
I have vmware on my windows PC ( hostname : acer ).
vmware has RHEL 7 ( hostname : rhel7 ) installed recently.
RHEL IP configuration
IP : 192.168.5.128
Netmask : 255.255.255.0
ssh to rhel7 works from acer using putty
resolve.conf
cat /etc/resolv.conf
nameserver 192.168.5.1
host... (12 Replies)
Discussion started by: hiten.r.chauhan
12 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)