![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Page feed in Troff | dpmore | UNIX for Dummies Questions & Answers | 2 | 05-18-2008 01:22 AM |
| Three feed plugins for WordPress | iBot | UNIX and Linux RSS News | 0 | 04-07-2008 01:40 AM |
| S-231: Adobe Form Designer and Form Client Vulnerabilities | iBot | Security Advisories (RSS) | 0 | 03-27-2008 07:10 AM |
| Disable form feed on a serial printer connected to Sco OpenServer | scoman2 | UNIX for Dummies Questions & Answers | 0 | 06-28-2005 09:25 AM |
| Changing Unix form to Microsoft Word form to be able to email it to someone. | Cheraunm | UNIX for Advanced & Expert Users | 8 | 05-24-2002 12:58 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
There've been quite a few posts on removing control characters.
Here's a couple: Removing carriage return characters from file getting rid of control characters |
|
#3
|
|||
|
|||
|
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
|
|||
|
|||
|
try...
tr -d "\f" <filename> warm regards, Vishnu |
|
#5
|
|||
|
|||
|
Hi, Vishnu,
Thanks for the information. But tr -d "\f" will remove all FF, not just the FIRST FF. Regards, Johnny |
|
#6
|
||||
|
||||
|
If the form-feed is within the first 10 lines, try....
Code:
sed '1,10s/^L//' file1 > file2 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 03:17 AM. |
||||
| Google The UNIX and Linux Forums |