Sponsored Content
Full Discussion: SED + "tab" character
Top Forums UNIX for Dummies Questions & Answers SED + "tab" character Post 302369655 by ghostdog74 on Monday 9th of November 2009 08:31:05 AM
Old 11-09-2009
the "1" is just short form to print. you can write this way
Code:
awk  '/no\.PC/{gsub($NF,"1")}{print}' file

when you posted your sample, you didn't include those metadata. next time, give as much information as close to your actual input as possible. So , again, what's really your final output?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

removing the "\" and "\n" character using sed or tr

Hi All, I'm trying to write a ksh script to parse a file. When the "\" character is encountered, it should be removed and the next line should be concatenated with the current line. For example... this is a test line #1\ should be concatenated with line #2\ and line number 3 when this... (3 Replies)
Discussion started by: newbie_coder
3 Replies

2. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

3. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

4. UNIX for Advanced & Expert Users

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

5. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

6. Shell Programming and Scripting

How to print range of lines using sed when pattern has special character "["

Hi, My input has much more lines, but few of them are below pin(IDF) { direction : input; drc_pinsigtype : signal; pin(SELDIV6) { direction : input; drc_pinsigtype : ... (3 Replies)
Discussion started by: nehashine
3 Replies

7. Shell Programming and Scripting

sed escape character for comment string "/*"

Good afternoon all, I'm hoping my newbie question can help bolster someone's street_cred.sh today. I'm trying to "fingerprint" SQL on its way into the rdbms for a benchmarking process (so I can tie the resource allocation back to the process more precisely). To do this, I'm essentially... (4 Replies)
Discussion started by: toeharp
4 Replies

8. Shell Programming and Scripting

Using sed to find text between a "string " and character ","

Hello everyone Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Discussion started by: haggismn
10 Replies

9. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

10. Shell Programming and Scripting

sed random \n for "n" range of character occurrences

I'd like to put paragraph breaks \n\n randomly between 5 - 10 occurrences of the dot character (.), for an entire text file. How to do that? In other words, anywhere between every 5 -10 sentences, a new paragraph will generate. There are no other uses of the (.) except for sentence breaks in... (11 Replies)
Discussion started by: p1ne
11 Replies
CACHE_REPAIR(8) 					      System Manager's Manual						   CACHE_REPAIR(8)

NAME
cache_repair - repair cache binary metadata from device/file to device/file SYNOPSIS
cache_repair [options] -i {device|file} -o {device|file} DESCRIPTION
cache_repair reads binary cache metadata created by the respective device-mapper target from one device or file , repairs it and writes it to another device or file. If written to a metadata device , the metadata can be processed by the device-mapper target. -i, --input {device|file} Input file or device with binary metadata. -o, --output {device|file} Output file or device for repaired binary metadata. -h, --help Print help and exit. -V, --version Output version information and exit. EXAMPLE
Reads the binary cache metadata from file metadata , repairs it and writes it to logical volume /dev/vg/metadata for further processing by the respective device-mapper target: cache_repair -i metadata -o /dev/vg/metadata DIAGNOSTICS
cache_repair returns an exit code of 0 for success or 1 for error. SEE ALSO
cache_dump(8) cache_check(8) cache_restore(8) AUTHOR
Joe Thornber <ejt@redhat.com> Heinz Mauelshagen <HeinzM@RedHat.com> Red Hat, Inc. Thin Provisioning Tools CACHE_REPAIR(8)
All times are GMT -4. The time now is 03:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy