11-30-2016
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
:start
/@~/{
h
s/\(.*\)@~.*$/\1/
s/@~$//
s/@~/\
/g
p
g
s/.*@~\(.*\)/\1/
}
//{
N
s/\n/ /
b start
} (2 Replies)
Discussion started by: djkane
2 Replies
2. Shell Programming and Scripting
I am having trouble parsing rpm filenames in a shell script.. I found a snippet of perl code that will perform the task but I really don't have time to rewrite the entire script in perl. I cannot for the life of me convert this code into something sed-friendly:
if ($rpm =~ /(*)-(*)-(*)\.(.*)/)... (1 Reply)
Discussion started by: suntzu
1 Replies
3. Shell Programming and Scripting
cur_fy=`grep "CONSOL" $GLDATA/parms/cur_fiscalyear.lis | awk '{print $2}'
Here i don't understand "CONSOL" and awk'{print$2)
Please help me out
cur_fiscalyear.lis contents :
DL 2011
MOL 2011
MV 2011
SF 2010
CONSOL 2011
MVU 2011 (3 Replies)
Discussion started by: Diddy
3 Replies
4. Shell Programming and Scripting
cat $BDDATA/svucon$i_bal_dup_email.dat ; uuencode $dup_in $dup_out
here svucon$i_bal_dup_email.dat ???
and uuencode ??
Please use and tags when posting code, data or logs etc. to preserve formatting and enhance readability, thanks. (2 Replies)
Discussion started by: Diddy
2 Replies
5. Shell Programming and Scripting
Dear unix team
i'm user for a system build on unix system ,so we need to run a lot of scripts not in one sission but every script on the associated terminal , so the script name = the name of the terminal which will run this script on it . and someone create a batch that make as below :
1- but... (4 Replies)
Discussion started by: fofatoti
4 Replies
6. Shell Programming and Scripting
why the case 2 will happen ? , ' should stop the history substitution ,shouldn't it?
case 1
# echo "123"|sed '/123/!d'
123
case 2
# echo "123
> 456
> 1
> "|sed '/123/!d'
-bash: !d': event not found
case 3
# echo "123
> 456
> 12
> "|sed '/123/'\!d
123
# bash --version (1 Reply)
Discussion started by: justlooks
1 Replies
7. Shell Programming and Scripting
Can someone do me a favour and explain the following for me:
((r=$RANDOM%$n+1))
I know what $RANDOM does but what is % sign and what does it do with %$n+1? (2 Replies)
Discussion started by: bashily
2 Replies
8. UNIX for Dummies Questions & Answers
I have a file of protein sequences with headers (my source file). Based on a list of IDs (which are included in some of the headers), I'd like to print out only the specified sequences, with only the ID as header.
In other words, I'd like to search source.txt for the terms in IDs.txt, and print... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
9. Shell Programming and Scripting
I am not a big expert in regex and have just little understanding of that language.
Could you help me to understand the regular Perl expression:
^(?!if\b|else\b|while\b|)(?:+?\s+){1,6}(+\s*)\(*\) *?(?:^*;?+){0,10}\{
------
This is regex to select functions from a C/C++ source and defined in... (2 Replies)
Discussion started by: alex_5161
2 Replies
10. Shell Programming and Scripting
I'm trying to get some exclusions into our sendmail regular expression for the K command. The following configuration & regex works:
LOCAL_CONFIG
#
Kcheckaddress regex -a@MATCH
+<@+?\.++?\.(us|info|to|br|bid|cn|ru)
LOCAL_RULESETS
SLocal_check_mail
# check address against various regex... (0 Replies)
Discussion started by: RobbieTheK
0 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)