Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.


Need to Chop Header and Footer record from input file


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Need to Chop Header and Footer record from input file

Hi, I need to chope the header and footer record from an input file and make a new output file, please let me know how i can do it in unix.thanks.
# 2  
Quote:
Originally Posted by coolbudy
Hi, I need to chope the header and footer record from an input file and make a new output file, please let me know how i can do it in unix.thanks.
You can use sed to print only those lines that are needed.

Or you can use grep similarily.

Vino
# 4  
If your header and footer are just one record length, you can use sed :
Code:
sed '1d;$d' input_file > output_file

This command delete firstrecord (1d) and last record ($d).


Jean-Pierre.
# 5  
Thanks a lot to all....for quick reply. ur suggestions are working well...i m using sed command given by aigles.Thanks once again buddy. Bye
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Eliminate Header and footer from EBCDIC file
abhilashnair
Is there any command to eliminate Header and footer from EBCDIC file... UNIX for Dummies Questions & Answers
4
UNIX for Dummies Questions & Answers
Is there a way to append both at header and footer of a file
jediwannabe
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...... Shell Programming and Scripting
3
Shell Programming and Scripting
Removing header or footer from file
sridhardwh
Hi Every one, what is the coomand to remove header or footer from a file. Please help me by providing command/syntax to remove header/footer from unix. Thanks in advance for all your support.... Shell Programming and Scripting
5
Shell Programming and Scripting
Add header and footer with record count in footer
itsranjan
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...... Shell Programming and Scripting
1
Shell Programming and Scripting
sort a report file having header and footer
suryanarayana
I am having report file with header and footer . The details in between header and footer are separated by a pipe charater. I want to sort the file by considering multiple columns in between header and footer. pls help... Shell Programming and Scripting
4
Shell Programming and Scripting

Featured Tech Videos