Sponsored Content
Top Forums Shell Programming and Scripting remove specific lines from flat file using perl Post 302166745 by meghana on Tuesday 12th of February 2008 05:06:05 PM
Old 02-12-2008
****

Im unable to understand what kind of character is that.. the one which looks like a box.. i thought it was a tab.. but im not sure...
can anyone help me??...
thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove specific lines from a file

Hi there I have a file with a variable amount of rows but the 45th, 46th and 47th charachter of each line is the status field which is a three digit code ie 001, 002, 003 etc. My question is this..I need to strip all the records/lines with 002's out of the file completely and put them into... (14 Replies)
Discussion started by: hcclnoodles
14 Replies

2. Shell Programming and Scripting

how to remove specific lines from a file

When restoring a file in my uninstall program I need to remove the lines I added to a file during the install. In between the file can be modified by the users. Assume file1 is as follow: xxx str2 xxxx ..... ...The Following lines containing str* have to be removed... xxx str1 xxxx xxx ... (17 Replies)
Discussion started by: bluemoon1
17 Replies

3. Shell Programming and Scripting

How to remove the lines from file using perl

Can anyone tell me what could be the solution to following : I have one .txt file which contains some seed information. This seed may appear multiple time in the file so what I want do is if this seed appears again in the file then that line should be removed. here is the contents of .txt... (5 Replies)
Discussion started by: dipakg
5 Replies

4. Shell Programming and Scripting

How to remove the specific lines from file using perl

Can anyone tell me what could be the solution to following : I have one .txt file which contains some "seed" information. This seed may appear multiple time in the file so what I want do is if this seed appears again in the file then that line should be removed. Please provide the script code... (4 Replies)
Discussion started by: dipakg
4 Replies

5. Shell Programming and Scripting

how to remove specific lines from a file (reprise)

Hello, I've to change the shell in /etc/passwd for some users . I've the list of users but I'm not able to modify the file with scripting . I'm working on a Sol10 . Can anyone help me ? tnks (7 Replies)
Discussion started by: gogol_bordello
7 Replies

6. UNIX for Dummies Questions & Answers

how to remove the first line from a flat file ?

Hi, I want to remove the first line from a flat file using unix command as simple as possible. Can anybody give me a hand ? Thanks in advance. xli (21 Replies)
Discussion started by: xli
21 Replies

7. UNIX for Dummies Questions & Answers

Search flat file in specific byte

I am on AIX Unix. I want to read a flat file for a string in a certain byte. I want to find the value: 943034 in column 56; and write out just those records to another file. Also, could I get the line/record number of where it was found in the input file? Thank you, sboxtops (1 Reply)
Discussion started by: sboxtops
1 Replies

8. Shell Programming and Scripting

Remove somewhat Duplicate records from a flat file

I have a flat file that contains records similar to the following two lines; 1984/11/08 7 700000 123456789 2 1984/11/08 1941/05/19 7 700000 123456789 2 The 123456789 2 represents an account number, this is how I identify the duplicate record. The ### signs represent... (4 Replies)
Discussion started by: jolney
4 Replies

9. UNIX for Advanced & Expert Users

Remove duplicates in flat file

Hi all, I have a issues while loading a flat file to the DB. It is taking much time. When analyzed i found out that there are duplicates entry in the flat file. There are 2 type of Duplicate entry. 1) is entire row is duplicate. ( i can use sort | uniq) to remove the duplicated entry. 2) the... (4 Replies)
Discussion started by: samjoshuab
4 Replies

10. Shell Programming and Scripting

awk to remove lines in file if specific field matches

I am trying to remove lines in the target.txt file if $5 before the - in that file matches sorted_list. I have tried grep and awk. Thank you :). grep grep -v -F -f targets.bed sort_list grep -vFf sort_list targets awk awk -F, ' > FILENAME == ARGV {to_remove=1; next} > ! ($5 in... (2 Replies)
Discussion started by: cmccabe
2 Replies
TBL(1)							      General Commands Manual							    TBL(1)

NAME
tbl - format tables for nroff or troff SYNOPSIS
tbl [ file ... ] DESCRIPTION
Tbl is a preprocessor for formatting tables for nroff or troff(1). The input files are copied to the standard output, except for segments of the form .TS options ; format . data .T& format . data . . . .TE which describe tables and are replaced by troff requests to lay out the tables. If no arguments are given, tbl reads the standard input. The (optional) options line is terminated by a semicolon and contains one or more of center center the table; default is left-adjust expand make table as wide as current line length box doublebox enclose the table in a box or double box allbox enclose every item in a box tab(x) use x to separate input items; default is tab linesize(n) set rules in n-point type delim(xy) recognize x and y as eqn(1) delimiters Each line, except the last, of the obligatory format describes one row of the table. The last line describes all rows until the next .T&, where the format changes, or the end of the table at .TE. A format is specified by key letters, one per column, either upper or lower case: L Left justify: the default for columns without format keys. R Right justify. C Center. N Numeric: align at decimal point (inferred for integers) or at S Span: extend previous column across this one. A Alphabetic: left-aligned within column, widest item centered, indented relative to L rows. ^ Vertical span: continue item from previous row into this row. - Draw a horizontal rule in this column. = Draw a double horizontal rule in this column. Key letters may be followed by modifiers, also either case: | Draw vertical rule between columns. || Draw a double vertical rule between columns. n Gap between column is n ens wide. Default is 3. Ffont Use specified font. B and I mean FB and FI. T Begin vertically-spanned item at top row of range; default is vertical centering (with Pn Use point size n. Vn Use n-point vertical spacing in text block; signed n means relative change. W(n) Column width as a troff width specification. Parens are optional if n is a simple integer. E Equalize the widths of all columns marked E. Each line of data becomes one row of the table; tabs separate items. Lines beginning with are troff requests. Certain special data items are recognized: _ Draw a horizontal rule in this column. = Draw a double horizontal rule in this column. A data line consisting of a single or draws the rule across the whole table. \_ Draw a rule only as wide as the contents of the column. Rx Repeat character x across the column. ^ Span the previous item in this column down into this row. T{ The item is a text block to be separately formatted by troff and placed in the table. The block continues to the next line begin- ning with T}. The remainder of the data line follows at that point. When it is used in a pipeline with eqn, the tbl command should be first, to minimize the volume of data passed through pipes. EXAMPLES
Let <tab> represent a tab (which should be typed as a genuine tab). .TS c s s c c s c c c l n n. Household Population Town<tab>Households <tab>Number<tab>Size Bedminster<tab>789<tab>3.26 Bernards Twp.<tab>3087<tab>3.74 Bernardsville<tab>2018<tab>3.30 .TE Household Population Town Households Number Size Bedminster 789 3.26 Bernards Twp. 3087 3.74 Bernardsville 2018 3.30 SOURCE
/sys/src/cmd/tbl SEE ALSO
troff(1), eqn(1), doctype(1) M. E. Lesk and L. L. Cherry, ``TBL--a Program to Format Tables'', Unix Research System Programmer's Manual, Tenth Edition, Volume 2. TBL(1)
All times are GMT -4. The time now is 01:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy