i am writing a bash script.. that produce output some thing like this:
i would like to combine all the entries that having the same but incremental (not sure what is the correct term) first column in condition that the rest of the column are exact match. best way to explain is by the following desire output:
im a beginner in script writing. mostly using bash script to automate my task and in my bash script contain nothing but very useful tool from unix itself like sed awk tail sort uniq column etc...
Last edited by Scott; 10-14-2017 at 10:31 PM..
Reason: Code tags
I am new to Unix and have tried to write a ksh script to do the following without success:
I have several reports in a directory (report1, report2, report3, etc). I would like to combine all of these reports into one file (REPORTS). I would like to append *** End of Report *** to each report so... (2 Replies)
I am trying to get some data from a file and print it on the same line.
I have a script that gets the date/time and calculates a DB query call time and sends to a file. I need to take this file and send it in a xcel like format with multiple data columns.
example output file (fndbq.out)
... (3 Replies)
The following input needs to be manipulated as follows:
INPUT from file or results of command:
============start:
Medium identifier : a45c0213:47eb5485:0aec:0321
Medium label : SQL Disk_11516
Location :
Protected : None ... (2 Replies)
Hi all,
I once knew of a simple unix command to do this, but I can't remember it and I can't find it by searching.
I have two files.
### FILE A ####
A1
A2
A3
A4
A5
### FILE B ####
B1
B2
B3
B4
B5 (2 Replies)
Hi all,
What is the sed command use to combine line?
Example:
Below is an output after extracted from few commands
aaa
bbb
ccc
ddd
eee
fff
ggg
and i would like to combine all the line as shown below,
aaa,bbb,ccc,ddd,eee,fff (5 Replies)
Hi,
I am not very familiar with sed and awk and i have a huge file to process which is impossible to do manually. I want to print out beginning from "Network" until end of line only (excluding the Version). AND. the decription to be all in one line.
File:
Version: 2.0 Network: xxx... (9 Replies)
Hello all,
i am new to linux , and please need your help and suggestion on....
when vi 1.txt :set list, it looks like
$ is displaying the end of line
Filter: vlan1-BUM-1M $
BUM-1M 0 ... (4 Replies)
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 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)