Sponsored Content
Full Discussion: SED + "tab" character
Top Forums UNIX for Dummies Questions & Answers SED + "tab" character Post 302369659 by Scrutinizer on Monday 9th of November 2009 08:35:24 AM
Old 11-09-2009
Quote:
Originally Posted by OneDreamCloser
thank you for your interest, at first.

@Scrutinizer : doesn t seem to do the right thing
On my system it does this:
Code:
$> sed 's/no\.PCs\t3/no.PCs\t1/g' infile
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf110
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural

\f0\fs24 \cf0 In the house, there are\
        no.PCs  1}

Perhaps your sed is '\t' challenged..
 

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
page_util_quote(3tcl)					      Parser generator tools					     page_util_quote(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
page_util_quote - page character quoting utilities SYNOPSIS
package require page::util::quote ?0.1? package require snit ::page::util::quote::unquote char ::page::util::quote::quote'tcl char ::page::util::quote::quote'tclstr char ::page::util::quote::quote'tclcom char _________________________________________________________________ DESCRIPTION
This package provides a few utility commands to convert characters into various forms. API
::page::util::quote::unquote char A character, as stored in an abstract syntax tree by a PEG processor (See the packages grammar::peg::interpreter, grammar::me, and their relations), i.e. in some quoted form, is converted into the equivalent Tcl character. The character is returned as the result of the command. ::page::util::quote::quote'tcl char This command takes a Tcl character (internal representation) and converts it into a string which is accepted by the Tcl parser, will regenerate the character in question and is 7bit ASCII. The string is returned as the result of this command. ::page::util::quote::quote'tclstr char This command takes a Tcl character (internal representation) and converts it into a string which is accepted by the Tcl parser and will generate a human readable representation of the character in question. The string is returned as the result of this command. The string does not use any unprintable characters. It may use backslash-quoting. High UTF characters are quoted to avoid problems with the still prevalent ascii terminals. It is assumed that the string will be used in a double-quoted environment. ::page::util::quote::quote'tclcom char This command takes a Tcl character (internal representation) and converts it into a string which is accepted by the Tcl parser when used within a Tcl comment. The string is returned as the result of this command. BUGS, IDEAS, FEEDBACK This document, will undoubtedly contain bugs and other problems. Please report such in the category page of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have. KEYWORDS
page, parser generator, quoting, text processing CATEGORY
Page Parser Generator COPYRIGHT
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net> page 1.0 page_util_quote(3tcl)
All times are GMT -4. The time now is 05:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy