10 More Discussions You Might Find Interesting
1. How to Post in the The UNIX and Linux Forums
Hello All,
I have a shell script where with the lines below:
echo "${v_sd_dateTime},${RUN_QUEUE_SIZE},${LOAD_AVERAGE},${v_sd_load_list},${v_sd_thread_count_list}" >> ${v_sd_file}
Format of the output :
01/05/2005 08:00:00, RUN_QUEUE_SIZE, LOAD_AVG, CPU_PROD1, CPU_PROD2, THREADS_PROD1,... (1 Reply)
Discussion started by: Supriya_84
1 Replies
2. Shell Programming and Scripting
I have to parse ASCII files, output the relevant data to a comma-delimited file and load it into a database table.
The specs for the file format have been recently updated and one section is causing problems. This is the original layout for that section.
... (2 Replies)
Discussion started by: alan
2 Replies
3. UNIX for Dummies Questions & Answers
Hi there,
i am updating a file on UNIX and have many lines as per below :
listen:x:37:4:Network Admin:/usr/net/nls:
i would like to substitute from the :/usr to the end of the line.
so at the moment im using this :
:s/"\/$/ /g
but i get an error.can anyone help?
thank you (3 Replies)
Discussion started by: brian112
3 Replies
4. UNIX for Dummies Questions & Answers
I usually use :
Code:
awk '{gsub(/xxx/,"yyy");print}'
to substitute xxx with yyy.
I have a problem substitute an expression like
Code:
x ' y
Because of the ( ' )
Any idea on how to get over this problem?
Thanks (2 Replies)
Discussion started by: cosmologist
2 Replies
5. UNIX for Dummies Questions & Answers
correct file names are:
*_0.txt
*_1.txt
incorrect file names are:
*_12.txt
*_0123.txt
*_04321.txt
all files that are incorrect need to replace the ending with *_1.txt
therefore need to create a loop to find the wrong files in a dir ->that dont end in _1.txt or _0.txt and then... (3 Replies)
Discussion started by: sigh2010
3 Replies
6. Shell Programming and Scripting
Hi,
I have query terms like this:
a) apple bannana
b) apple bannana AND chickko
c) "milk shake" OR Graphes orange
whereever there is space substitue with AND operator.
I tried like this: (2 Replies)
Discussion started by: vanitham
2 Replies
7. Shell Programming and Scripting
i'm writing a script that will extract and substitute a certain part of a data.
i'm having trouble with the substituting part ...
Here's my data looks like:
01/01/08-001-23:46:18-01/01/08-23:50:43
01/01/08-003-23:45:19-01/01/08-23:55:49
01/01/08-005-23:52:18-01/01/08-23:58:52
i want to... (6 Replies)
Discussion started by: solidhelix08
6 Replies
8. UNIX for Dummies Questions & Answers
hi!
first i want to apologize for two things. my English and (possible) posting in the wrong sub forum (i couldn't find one that fits my question)
I am needing a script that can substitute rm.
the idea is that the operator can/must delete some folders and files from time to time, when the free... (2 Replies)
Discussion started by: broli
2 Replies
9. UNIX for Dummies Questions & Answers
Can anyone tell me what is the purpose of a substitute variable in the unix programming language and give an example where it may be used?
Thanks! (0 Replies)
Discussion started by: mmg2711
0 Replies
10. UNIX for Dummies Questions & Answers
I know in vi you can do
:%s/replaceme/withthis/
but if i want to find all lines say without a # at the begining and I want to put it in how would that command be formatted? I can't figure it out for the life of me.
#comment
blah1
hey1
grrr1
#comment
#blah1
#hey1
#grrr1 (5 Replies)
Discussion started by: kingdbag
5 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)