Sponsored Content
Top Forums UNIX for Dummies Questions & Answers remove the header and footer using sed Post 302585466 by pandeesh on Wednesday 28th of December 2011 12:02:47 PM
Old 12-28-2011
Yes. grep is the simplest solution for this.
Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove header and footer rows

I would like to remove some lines from begining of file (header) and some lines from end of file (footer). The header/footer lines generated by web-browser when the user upload a file to my webserver. Example: -----------------------------7d62af20c052c Content-Disposition: form-data;... (2 Replies)
Discussion started by: seaky
2 Replies

2. Shell Programming and Scripting

Inserting Header and footer

Hi All, I have several txt files i need to enter specific header and footer (both are separate) to all these files how can i do this? plz help.. Regards, Raghav (4 Replies)
Discussion started by: digitalrg
4 Replies

3. Shell Programming and Scripting

How to add header and footer?

Hi, Guys, I want add header and footer in a file. I can add footer using following command: echo "Footer" >>file. I don't know how to add header. Thanks in advance (4 Replies)
Discussion started by: ken002
4 Replies

4. UNIX for Dummies Questions & Answers

Help with the Header and Footer check

Hi, I need to check whether the incoming file has a header and footer using a UNIX script. The pattern of the header and footer is fixed as follows: Header: Name,Date Footer: Count, Total Name,Date ------------------------- ------------------------- ------------------------- Count,... (5 Replies)
Discussion started by: Sunny_teotia
5 Replies

5. Shell Programming and Scripting

Header and Footer...

Hi All, I need to write a script that In my file I have to check header and footer records are available or not. If it is available I have to run the script, otherwise I should not. But current script it is checking only the data inside the script. It is avoiding to check Header and Footer... (1 Reply)
Discussion started by: suresh_target
1 Replies

6. Shell Programming and Scripting

Removing header and footer

I have two files which are getting sent to a UNIX server in order to be bcp'd into a database. The bcp is failing because there's a header and footer row on the file which give the date of the file and the number of rows in it. That's because the file is also being used for another process, so we... (1 Reply)
Discussion started by: Tom Sawyer
1 Replies

7. Shell Programming and Scripting

Add header and footer with record count in footer

This is my file(Target.txt) name|age|locaction abc|23|del xyz|24|mum jkl|25|kol The file should be like this 1|03252012 1|name|age|location 2|abc|23|del 2|xyz|24|mum 2|jkl|25|kol 2|kkk|26|hyd 3|4 Column 1 is row indicator for row 1 and 2, column indicator is 1,for data rows... (1 Reply)
Discussion started by: itsranjan
1 Replies

8. Programming

[solved] how to remove header and footer

it still display header and footer header SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 24 13:41:51 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real... (0 Replies)
Discussion started by: ment0smintz
0 Replies

9. Shell Programming and Scripting

Is there a way to append both at header and footer of a file

currently I've a file Insert into CD_CARD_TYPE (CODE, DESCRIPTION, LAST_UPDATE_BY, LAST_UPDATE_DATE) Values ('024', '024', 2, sysdate); Insert into CD_CARD_TYPE (CODE, DESCRIPTION, LAST_UPDATE_BY, LAST_UPDATE_DATE) Values ('032', '032', 2, sysdate); ........ is it... (3 Replies)
Discussion started by: jediwannabe
3 Replies

10. Shell Programming and Scripting

Strip header and footer

Hi I have below requirements on the script below : (1) I receive 2 pipe seperated file called OUT.psv and DIFF.psv with a column header.I concatenate the 2 files and create a final.psv file. I want to add another header as START_FILE to the final.psv file . How to achieve this ? (2) I have... (5 Replies)
Discussion started by: samrat dutta
5 Replies
nl(1)							      General Commands Manual							     nl(1)

NAME
nl - line numbering filter SYNOPSIS
type] type] type] start#] incr] sep] width] format] num] delim] [file] DESCRIPTION
reads lines from the named file or the standard input if no file is named and reproduces the lines on the standard output. Lines are num- bered on the left in accordance with the command options in effect. views the text it reads in terms of logical pages. Line numbering is reset at the start of each logical page. A logical page consists of a header, a body, and a footer section. Empty sections are valid. Different line numbering options are independently available for header, body, and footer (e.g., no numbering of header and footer lines while numbering blank lines only in the body). The start of logical page sections are signaled by input lines containing nothing but the following delimiter character(s): | Line contents | Start of --------------+---------- ::: | header :: | body : | footer Unless told otherwise, assumes the text being read is in a single logical page body. Command options can appear in any order and can be intermingled with an optional file name. Only one file can be named. recognizes the following options: Specifies which logical page body lines are to be numbered. Recognized types and their meanings are: number all lines; number lines with printable text only; no line numbering; number only lines that contain the regular expression specified in string. Basic Regular Expression syntax is supported (see regexp(5)). The default type for logical page body is (text lines numbered). Same as except for header. Default type for logical page header is (no lines numbered). Same as except for footer. Default for logical page footer is (no lines numbered). Do not restart numbering at logical page delimiters. start# is the initial value used to number logical page lines. Default is incr is the increment value used to number logical page lines. Default is sep is the character or characters used in separating the line number and the corresponding text line. Default sep is a tab. width is the number of character columns to be used for the line number. Default width is format is the line numbering format. Recognized values are: left justified, leading zeroes suppressed; right justified, leading zeroes suppressed; right justified, leading zeroes kept. Default format is (right justified). num is the number of consecutive blank lines to be treated and numbered as a single line. For example, results in every third adjacent blank line being numbered if the appropriate and/or option is set. Default is The delimiter characters specifying the start of a logical page section can be changed from the default characters to two user-specified characters. If only one character is entered, the second character remains the default character No space should appear between the and the delimiter characters, how- ever, this restriction is not there for (see standards(5)) compliant To define a backslash as the delimiter, use two backslashes. EXTERNAL INFLUENCES
For information about the UNIX Standard environment, see standards(5). Environment Variables determines the collating sequence used in evaluating regular expressions. determines the characters matched by character class expressions in regular expressions. If or is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty variable. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single-byte character code sets are supported. EXAMPLES
Number starting at line number 10, using an increment of ten. The logical page delimiters are and SEE ALSO
pr(1), environ(5), lang(5), regexp(5), standards(5). STANDARDS CONFORMANCE
nl(1)
All times are GMT -4. The time now is 07:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy