home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!gumby!wupost!sdd.hp.com!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!fnnews!fnsony.fnal.gov!shah
- From: shah@fnsony.fnal.gov (Hemant Shah)
- Newsgroups: comp.unix.questions
- Subject: Re: problem with vi..
- Message-ID: <2195@fnnews.fnal.gov>
- Date: 17 Aug 92 17:38:57 GMT
- References: <1992Aug17.155121.21926@njitgw.njit.edu>
- Sender: news@fnnews.fnal.gov
- Reply-To: shah@fnalb.fnal.gov
- Organization: Fermi National Accelerator Laboratory, Batavia, IL
- Lines: 51
- Nntp-Posting-Host: fnsony.fnal.gov
-
- In article <1992Aug17.155121.21926@njitgw.njit.edu>, cxk6819@hertz.njit.edu (K. Chandrakanth) writes:
- |> Dear netters,
- |> I have a sparc workstation 2.
- |> I mounted the floppy drive and copied few files from the floppy. But
- |> when I viewed through vi I happened to see ^M at the end of each line.
- |> When I cat the file it looks normal. Will some one tell me the reason
- |> for this. If possible please send me a shell script or small c program
- |> to remove this. I am enclosing a sample of the file.
- |>
- |> But when I compile the file it works fine. The control characters
- |> are really irritating. So help me.
- |>
- |> struct employee {^M
- |> e_type typer;^M
- |> employee *next;^M
- |> char name[20];^M
- |> short department;^M
- |> };^M
- |> ^M
- |> struct manager:employee {^M
- |> employee* group;^M
- |> short level;^M
- |> };^M
- |> void print_emp(employee *);^M
- |> void f(employee *);^M
- |> void print_emp(employee *e)^M
- |> {^M
- |>
- |> Please email to me. Thanks in advance...
- |>
- |> cxk6819@hertz.njit.edu
- |>
- |> --
- |> god's theorem:
- |> those who sow in tears will reap in joy.
-
- vi the file and type following vi command:
-
- :%s/^VM//g
-
-
- where '^V' is one character <Ctrl>V
- --
- -------------------------------------------------------------------------------
- Hemant Shah | All the opinions expressed are my own
- Fermi National Accelerator Laboratory | and does not necessarily reflect
- Systems Integration Group | those of Fermilab.
- E-mail :shah@fnal.fnal.gov |
- Voice : (708) 840-8071 | I haven't lost my mind
- Fax : (708) 840-2783 | it's backed on tape somewhere.
- -------------------------------------------------------------------------------
-