Sponsored Content
Full Discussion: UNIX question on grep
Top Forums Shell Programming and Scripting UNIX question on grep Post 302939271 by ramkumar15 on Tuesday 24th of March 2015 09:01:11 AM
Old 03-24-2015
thanks for your detailed explanation.

I would need to delete that particular word in all the files present in the one particual directories.

The particular word
Code:
 /klp/

is present in the directory
Code:
 /us/hub/

my request is to delete the particular matched string alone.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep question

hi all, I need to grep for a string in a file which is in another string For Ex: This is the sample file sample.txt number 1234 name raje passwd 1234 date 123 service 75 service 23 I have made a unix command like this, i am not sure this is correct or wrong. If any better... (3 Replies)
Discussion started by: raje17
3 Replies

2. UNIX for Dummies Questions & Answers

grep -f question

when using grep -f file1 file2 if you have multiple entries in the pattern file1 that are the same will it take the line out of file2 that matches file1 each time it comes up? if not by default can you set a flag to make this possible? or another way - can you get it to search for and match the... (8 Replies)
Discussion started by: Adriel
8 Replies

3. UNIX for Dummies Questions & Answers

grep question

I wanted to search a for all lines containing ERROR but not errors that contained the word "foo" (for example). The only way I could figure out to do it was: grep ERROR myfile.log | grep -v foo is there a way to do this with one grep command instead of two? One grep is faster than two,... (4 Replies)
Discussion started by: tim-bobby
4 Replies

4. Shell Programming and Scripting

Question of grep

As i understand the filter process of grep i was wondering, is it possible to to have a hidden word in a file(eg ------) and then use the grep filter to find a specific letter in that word which you can then replace with the letter in that word (eg ---a--) if it is please show me an example if it... (6 Replies)
Discussion started by: ZAXTHEGREAT
6 Replies

5. UNIX for Dummies Questions & Answers

grep question

Hi, I want to grep a word "success" from /home/user/ab123 and put it in a txt file. There are lot of directories under ab123 and subdirectories. So is it like this? /home/user/123: grep -i -R "success" > grepsuccess. Please give me a command... Thanks. (4 Replies)
Discussion started by: everurs789
4 Replies

6. Shell Programming and Scripting

Question in grep

I have a requirement where I need to search for 26 consecutive 000000.000 in a file. I tried using grep but it is not working. The string I need to search is ... (2 Replies)
Discussion started by: gpaulose
2 Replies

7. UNIX for Dummies Questions & Answers

| help | unix | grep - Can I use grep to return a string with exactly n matches?

Hello, I looking to use grep to return a string with exactly n matches. I'm building off this: ls -aLl /bin | grep '^.\{9\}x' | tr -s ' ' -rwxr-xr-x 1 root root 632816 Nov 25 2008 vi -rwxr-xr-x 1 root root 632816 Nov 25 2008 view -rwxr-xr-x 1 root root 16008 May 25 2008... (7 Replies)
Discussion started by: MykC
7 Replies

8. UNIX for Dummies Questions & Answers

| help | unix | grep (GNU grep) 2.5.1 | advanced regex syntax

Hello, I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide. ls -aLl /bin | grep "\(x\)" Which works, just highlights 'x' where ever, when ever. I'm trying to to get (?:) to work but... (4 Replies)
Discussion started by: MykC
4 Replies

9. UNIX for Dummies Questions & Answers

grep question

Hi everyone, i am german, so excuse my bad english. i got a problem with the grep-command. i got a file with a lot of entries and i want to grep some of them out into another file. here is a part of the file: 1038194 ξΟΥ΢ΙΝ & δΕ΢ΞΗΑΜΠ΢, βξη 10, 1886, 486, ΝΟ. 1038195 1; 1038196 ... (2 Replies)
Discussion started by: JustAnotherUser
2 Replies

10. Shell Programming and Scripting

New Unix user with shell script question using grep

Hello, I am a new Unix user and new to shell programming. I am working on a script to go through a log file and find the text error: grep -i 'error' monplus.mplog if I find the text error in the log file I would like to echo a message to the operator staing there is an error I am currently... (2 Replies)
Discussion started by: dtracy01
2 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)
All times are GMT -4. The time now is 04:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy