Form Feed...


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Form Feed...
# 1  
Old 10-30-2003
Form Feed...

Hi,


I've a text file that has a formfeed character at the beginning.
I want to get rid of this formfeed character using sed.

But I don't know how to specify the formfeed character.
I've tried \014 (octal for formfeed), \f but still not works.


Regards,


Johnny
# 2  
Old 10-31-2003
# 3  
Old 10-31-2003
Hi, oombera,


Thanks for the information.

Actually I use ORACLE SQLPLUS to generate
a text file with form feeds before each page
(including the 1st page).
So I want to get rid of the FIRST formfeed so as
not to waste a piece of paper.

I try to use sed with a command

1s/\f//

but does not work.


Regards,


Johnny
# 4  
Old 10-31-2003
try...

tr -d "\f" <filename>

warm regards,
Vishnu
# 5  
Old 10-31-2003
Hi, Vishnu,


Thanks for the information.

But tr -d "\f" will remove all FF,
not just the FIRST FF.


Regards,


Johnny
# 6  
Old 10-31-2003
If the form-feed is within the first 10 lines, try....
Code:
sed '1,10s/^L//' file1 > file2

....where ^L is Ctrl-V Ctrl-L

OR

To remove only the first line-feed in the file, try....
Code:
awk '/\014/&&f<1{sub("\014","");f=1};1' file1 > file2


Last edited by Ygor; 10-31-2003 at 06:17 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert FF (feed form) in text file so that when printing the printer print on a new page accordingly

Hello. First happy new year to everybody. I have a script that generate a text file ( /tmp/part_list.txt for example ). This file can be edited using a kde graphical text editor like kate or kwrite The file can be printed out from command line or within the text editor using the print... (5 Replies)
Discussion started by: jcdole
5 Replies

2. Shell Programming and Scripting

Remove x lines form top and y lines form bottom using AWK?

How to remove x lines form top and y lines form bottom. This works, but like awk only cat file | head -n-y | awk 'NR>(x-1)' so remove last 3 lines and 5 firstcat file | head -n-3 | awk 'NR>4' (5 Replies)
Discussion started by: Jotne
5 Replies

3. Shell Programming and Scripting

Transpose Data form Different form

HI Guys, I have data in File A.txt RL03 RL03_A_1 RL03_B_1 RL03_C_1 RL03 -119.8 -119.5 -119.5 RL07 RL07_A_1 RL07_B_1 RL07_C_1 RL07 -119.3 -119.5 -119.5 RL15 RL15_A_1 RL15_C_1 RL15 -120.5 -119.4 RL16... (2 Replies)
Discussion started by: asavaliya
2 Replies

4. AIX

Printer delay before final form feed

Hi, I am new to printing with Unix (AIX on HP). I am printing from a COBOL program. On our test system the page prints and does a Form Feed to the next page. This is good. When I release the program to our customer it prints the page but waits 5 or more seconds before doing a page... (11 Replies)
Discussion started by: habler
11 Replies

5. Shell Programming and Scripting

replace last form feed with line feed

Hi I have a file with lots of line feeds and form feeds (page break). Need to replace last occurrence of form feed (created by - echo "\f" ) in the file with line feed. Please advise how can i achieve this. TIA Prvn (5 Replies)
Discussion started by: prvnrk
5 Replies

6. UNIX for Dummies Questions & Answers

Page feed in Troff

Hi, does anyone knows how to give the page feed command to Printer in troff. Actually I want to implement the functionality where I'll print say 10 pages and I want user to stop printer at 5th page to do manual feed by user .... (2 Replies)
Discussion started by: dpmore
2 Replies

7. UNIX for Dummies Questions & Answers

Disable form feed on a serial printer connected to Sco OpenServer

I connected a serial printer to my scoOpenServer which works great. I was able to disable the banner in the interface of the printer. However i am unable to find the command in the interface to disable the formfeed . Below is a copy of the interface file. Please can anyone instruct me on how to... (0 Replies)
Discussion started by: scoman2
0 Replies

8. UNIX for Advanced & Expert Users

Changing Unix form to Microsoft Word form to be able to email it to someone.

Please someone I need information on how to change a Unix form/document into a microsoft word document in order to be emailed to another company. Please help ASAP. Thankyou :confused: (8 Replies)
Discussion started by: Cheraunm
8 Replies
Login or Register to Ask a Question