tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Control codes in VI when using replace
@ 2001-10-15 23:05 Sudhir Oak
  0 siblings, 0 replies; only message in thread
From: Sudhir Oak @ 2001-10-15 23:05 UTC (permalink / raw)
  To: tru64-unix-managers

I need to replace the line feed (not Ctrl M, but I think it is Ctrl J, it =
shows as a $ sign if you set the set list option on when viewing the file) =
character with ,line feed.  It's a big file=20
I have tried the tr command with
tr -s "\012"  "\054\012" <filein >fileout
This gave me a file replacing converting all records into a big single =
record replacing the linefeed with commas!
When I tried the vi, and used the command level :s command, as soon as I =
type the Ctrl V Ctrl J sequence it escapes the command level and comes =
back with no matching pattern error.
I can import the file into m/s word and then use the replace ^p with ,^p =
and then upload it to Unix and it will work, but I was trying to avoid =
that  extra work.  I have used tr command to replace the Ctrl M with line =
feed tr -s "\015" "\012" but I am not having much success replacing a =
single character with mutiple characters using the tr or any other command =
in vi that I am aware of.
Your response will be greatly appreciated.


Thanks,

Oak
603-230-1160 (CRHC)
860-945-6780 (when working remotely)
203-982-6463 (New Pager eff 10/10/2001)
=20

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-15 23:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-15 23:05 Control codes in VI when using replace Sudhir Oak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox