Sponsored Content
Top Forums UNIX for Dummies Questions & Answers why the <tab> could be not recognized in grep and sed? Post 302209634 by jim mcnamara on Friday 27th of June 2008 03:25:32 PM
Old 06-27-2008
The blank lines have other non-printing characters - not tabs.
try
Code:
od -c file | more

to see what other stuff is in there.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep tab

I want to grep "xxx(tab)iii" but dunno the way to do it. I've tried : grep "xxx\tiii" * , but it dont works. Is there anyone that can help me? :) (3 Replies)
Discussion started by: AkumaTay
3 Replies

2. UNIX for Dummies Questions & Answers

how to grep for blank records (space,tab,/n)?

I want to exclude (-v) blank records from a file before analysing it. I know I can use '^]$' for spaces and tabs but how do you look for lines that have nothing (/n or line feed) ? (2 Replies)
Discussion started by: Browser_ice
2 Replies

3. UNIX for Dummies Questions & Answers

using Grep with a tab

how can i use grep to search a file with a tab, for example grep -l "Text<TAB>Text" *.txt (2 Replies)
Discussion started by: Adriel
2 Replies

4. Shell Programming and Scripting

sed: how to insert tab?

Hi, I'm using the following to insert lines into file: sed ${rowNr}i'\ first row\ second row\ third row\ ' file.txt How can I add tab in front of each added line? "\t" or actual TAB does not seem to work? Thanks! (2 Replies)
Discussion started by: Juha
2 Replies

5. Shell Programming and Scripting

sed imbed a tab

I'm using OpenBSD 4.3 & ksh (pdksh) default shell. I'm trying to use sed to insert a tab into a text file with no luck. $ sed 's/SusanAppleton/Susan\o011Appleton/' myFile.txt Susano011Appleton $ sed 's/SusanAppleton/Susan\tAppleton/' myFile.txt SusantAppletonI'm close to suicide here. Please... (9 Replies)
Discussion started by: na5m
9 Replies

6. UNIX for Dummies Questions & Answers

Tab spaces with sed

Anyone know how to represent tabs when doing subsitutions in sed? I have tried using \t but it doesn't seem to work. (11 Replies)
Discussion started by: handak9
11 Replies

7. Shell Programming and Scripting

how to replace new line ( \n ) with space or Tab in Sed

Hi, how to replace new line with tab in sed ... i used sed -e 's/\n/\t/g' <filename > but its not working (1 Reply)
Discussion started by: mail2sant
1 Replies

8. Shell Programming and Scripting

sed newline to tab ,problem

Input: gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly sed 's/\n/\t/g' infile It's not working. Output should be: gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly (5 Replies)
Discussion started by: cola
5 Replies

9. Shell Programming and Scripting

SED - Unable to replace with <tab>

Hello All, I have this file with the below contents 1|2|3|4| this|that|which|what| when I use, sed 's/|/\t/g' infile I get, 1t2t3t4t thistthattwhichtwhatt Why is this?? :confused: :wall: (13 Replies)
Discussion started by: PikK45
13 Replies

10. UNIX for Beginners Questions & Answers

Grep solutions tab-delimited file

Hello, I am trying to find a solution to problem that's proving to be beyond my newbie skills. The below files comes from a genetics study. File 1 describes a position on the genome and file 2 does the same but is formatted differently and has more information. I am trying to match all lines in... (5 Replies)
Discussion started by: andmal
5 Replies
hp(1)							      General Commands Manual							     hp(1)

NAME
hp - handle special functions of HP2640 and HP2621-series terminals SYNOPSIS
DESCRIPTION
supports special functions of the Hewlett-Packard HP 2640 and HP 2621 series of terminals, with the primary purpose of producing accurate representations of most output. A typical use is: Regardless of the hardware options on a given terminal, tries to do sensible things with underlining and reverse line-feeds. If the termi- nal has the ``display enhancements'' feature, subscripts and superscripts can be indicated in distinct ways. If it has the ``mathematical- symbol'' feature, Greek and other special characters can be displayed. Options recognizes the following options: Specify that your terminal has the ``display enhancements'' feature, to make maximal use of the added display modes. Overstruck characters are presented in the Underline mode. Superscripts are shown in Half-bright mode, and subscripts in Half-bright, Underlined mode. If this flag is omitted, assumes that your terminal lacks the ``display enhancements'' feature. In this case, all overstruck characters, subscripts, and super- scripts are displayed in Inverse Video mode; that is, dark-on-light, rather than light-on-dark. Request minimization of output by removing new-lines. Any contiguous sequence of 3 or more new-lines is converted into a sequence of only 2 new-lines; that is, any number of successive blank lines produces only a single blank output line. This allows you to retain more actual text on the screen. DIAGNOSTICS
The representation of a line exceeds 1,024 characters. RETURN VALUE
returns zero for normal termination, and 2 for all errors. WARNINGS
An ``overstriking sequence'' is defined as a printing character followed by a backspace followed by another printing character. In such sequences, if either printing character is an underscore, the other printing character is shown underlined or in Inverse Video; otherwise, only the first printing character is shown (again, underlined or in Inverse Video). Nothing special is done if a backspace is adjacent to an ASCII control character. Sequences of control characters (e.g., reverse line-feeds, backspaces) can make text ``disappear''; in partic- ular, tables generated by that contain vertical lines will often be missing the lines of text that contain the ``foot'' of a vertical line, unless the input to is piped through (see col(1)). Although some terminals do support numerical superscript characters, no attempt is made to display them. SEE ALSO
col(1), neqn(1), nroff(1), tbl(1). hp(1)
All times are GMT -4. The time now is 10:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy