Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...If there has ever been a justification needed for access to the net during working hours, just referring to this site should suffice. Fantastic!..."

Geography

Where in the world do Tek-Tips members come from?
pfildes (Programmer)
2 May 12 11:11
Hi,

I have a need to replace a FF character (Form Feed) in a printer spool file with a CRLF (Carriage Return & Line Feed).

I previously replaced the FF character with a blank character using the TR command (e.g: tr '\014' ' '), but I now need to insert a blank line too.

Can anybody help please?
pfildes (Programmer)
3 May 12 9:12
That did work, but not quite how I expected. I need another blank line. I'd therefore need something like ; tr '\014' '\012\012'

Obviously, I can't do that because there's a mismatch of number of characters.

Is there any other method of doing this? Is it possible using 'sed'?
Annihilannic (MIS)
3 May 12 19:44
Or sed:

CODE

sed 's/^L/\
\
/g' inputfile >outputfile

To enter the "^L" character in vi, use Ctrl-V Ctrl-L.

Annihilannic
tgmlify - code syntax highlighting for your tek-tips posts

pfildes (Programmer)
17 May 12 7:40
I tried many solutions which didnt give me the desired effect. I eventually went with the following;

CODE

tr '\014' '\012'

Seemed to work for me

Thanks to those who responded smile

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close