Sponsored Content
Top Forums UNIX for Advanced & Expert Users Insert 1 space using the command sed Post 302638267 by ic12 on Thursday 10th of May 2012 05:03:08 AM
Old 05-10-2012
Thank you so much. All that worked perfect.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SED command to change ./ to a space

Hello, i'm trying to remove the ./ from this file using this SED command: sed 's/.///g' all3.lst > all4.lst Does anyone know the correct format for this? For example, i'm trying to convert ./_ABMSTR.TXT.out to: _ABMSTR.TXT.out Thanks... (11 Replies)
Discussion started by: bobk544
11 Replies

2. Shell Programming and Scripting

Insert a line including Variable & Carriage Return / sed command as Variable

I want to instert Category:XXXXX into the 2. line something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong: sed "2i\\${n}Category:$cat\n" Sample: Titel Blahh Blahh abllk sdhsd sjdhf Blahh Blah Blahh Blahh Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies

3. UNIX for Dummies Questions & Answers

sed insert command and variable expansion/command substitution

I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename? #!/bin/bash filename=`echo $0` /usr/bin/sed '/#include/ { i\ the filename is `$filename` }' $1 exit 0 (8 Replies)
Discussion started by: glev2005
8 Replies

4. Shell Programming and Scripting

Insert space between characters using sed

Input: Youcaneasilydothisbyhighlightingyourcode. Putting space after three characters. You can eas ily dot his byh igh lig hti ngy our cod e. How can i do this using sed? (10 Replies)
Discussion started by: cola
10 Replies

5. Shell Programming and Scripting

awk or sed command to print specific string between word and blank space

My source is on each line 98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Discussion started by: elamurugu
5 Replies

6. Shell Programming and Scripting

help - sed - insert space between string of form XxxAxxBcx, without replacing the pattern

If the string is of the pattern XxxXyzAbc... The expected out put from sed has to be Xxx Xyz Abc ... eg: if the string is QcfEfQfs, then the expected output is Qcf Ef Efs. If i try to substitute the pattern with space then the sed will replace the character or pattern with space,... (1 Reply)
Discussion started by: frozensmilz
1 Replies

7. Shell Programming and Scripting

SED - insert space at the beginning of line and multi replace command

hi I am trying to use SED to replace the line matching a pattern using the command sed 'pattern c\ new line ' <file1 >file 2 I got two questions 1. how do I insert a blank space at the beginning of new line? 2. how do I use this command to execute multiple command using the -e... (5 Replies)
Discussion started by: piynik
5 Replies

8. Shell Programming and Scripting

Insert charactera in 1st position of specific lines using vi editor or sed command

Dear all, i am having text file like below surya rama ranga laxman rajesh reddy i want add string (OK) before a text from line 3 to 5 the result will be surya rama OK ranga OK laxman OK rajesh reddy (1 Reply)
Discussion started by: suryanarayana
1 Replies

9. UNIX for Dummies Questions & Answers

sed command to Insert a line before the last four lines of the file

By using sed command, How to insert a new line before the last four lines of the file. Old Line Old Line NEW LINE! Old Line Old Line Old Line Old Line (8 Replies)
Discussion started by: wridler
8 Replies

10. Shell Programming and Scripting

Insert space in a word using sed

Hi all, I have a file that looks like this- ----------------------------- . . ATOM 8 O2' U A 5 135.452 109.687 7.148 1.00 48.99 A16S ATOM 9 C1' U A 5 135.282 111.512 5.641 1.00 48.99 A16S ATOM 10 N1 U A 5 134.647 112.595 ... (2 Replies)
Discussion started by: asmi_g
2 Replies
NBPERF(1)						    BSD General Commands Manual 						 NBPERF(1)

NAME
nbperf -- compute a perfect hash function SYNOPSIS
nbperf [-ps] [-a algorithm] [-c utilisation] [-h hash] [-i iterations] [-m map-file] [-n name] [-o output] [input] DESCRIPTION
nbperf reads a number of keys one per line from standard input or input. It computes a minimal perfect hash function and writes it to stdout or output. The default algorithm is "chm". The -m argument instructs nbperf to write the resulting key mapping to map-file. Each line gives the result of the hash function for the corresponding input key. The parameter utilisation determines the space efficiency. Supported arguments for -a: chm This results in an order preserving minimal perfect hash function. The utilisation must be at least 2, the default. The number of iterations needed grows if the utilisation is very near to 2. chm3 Similar to chm. The resulting hash function needs three instead of two table lookups when compared to chm. The utilisation must be at least 1.24, the default. This makes the output for chm3 noticable smaller than the output for chm. bpz This results in a non-order preserving minimal perfect hash function. Output size is approximately 2.79 bit per key for the default value of utilisation, 1.24. This is also the smallest supported value. Supported arguments for -h: mi_vector_hash Platform-independent version of Jenkins parallel hash. See mi_vector_hash(3). The number of iterations can be limited with -i. nbperf outputs a function matching uint32_t hash(const void * restrict, size_t) to stdout. The function expects the key length as second argument, for strings not including the terminating NUL. It is the responsibility of the call- er to pass in only valid keys or compare the resulting index to the key. The function name can be changed using -n name. If the -s flag is specified, it will be static. After each failing iteration, a dot is written to stderr. nbperf checks for duplicate keys on the first iteration that passed basic hash distribution tests. In that case, an error message is printed and the program terminates. If the -p flag is specified, the hash function is seeded in a stable way. This may take longer than the normal random seed, but ensures that the output is the same for repeated invocations as long as the input is constant. EXIT STATUS
The nbperf utility exits 0 on success, and >0 if an error occurs. SEE ALSO
mi_vector_hash(3) AUTHORS
Jorg Sonnenberger BSD
September 25, 2012 BSD
All times are GMT -4. The time now is 04:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy