[Wolves] Unix Problem
Rob Malpass
rob at malpass133.fsnet.co.uk
Tue May 1 17:44:33 BST 2007
----- Original Message -----
From: "Broadfield Robert" <BroadfieldR at walsall.gov.uk>
To: "Wolverhampton Linux User Group" <wolves at mailman.lug.org.uk>
Sent: Tuesday, May 01, 2007 1:56 PM
Subject: RE: [Wolves] Unix Problem
Thanks David
The version of AIX Unix (Korn shell) we use doesn't recognise dos2unix.
I've looked at the man pages for sed and it's quite complex. Also,
there aren't any characters in the file for linefeeds - it just seems to
be a flat file. I may try pasting into Ms Word and play about with page
width to try and get some result.
Thanks anyway
Rob
-----Original Message-----
From: wolves-bounces at mailman.lug.org.uk
[mailto:wolves-bounces at mailman.lug.org.uk] On Behalf Of David Goodwin
Sent: 01 May 2007 12:15
To: Wolverhampton Linux User Group
Subject: Re: [Wolves] Unix Problem
> I may be missing something obvious, but is there a way of manipulating
> the file in Unix so that I don't have to do this?
>
> I'm hoping that those of you have Unix experience/background may be
> able to help.
How about :
- dos2unix
- sed
I presume you mean the \r\n and \n linefeeds; or is something else used?
David.
--
David Goodwin
[ david at codepoets dot co dot uk ]
[ http://www.codepoets.co.uk ]
_______________________________________________
Wolves LUG mailing list
Homepage: http://www.wolveslug.org.uk/
Mailing list: Wolves at mailman.lug.org.uk
Mailing list home: https://mailman.lug.org.uk/mailman/listinfo/wolves
_______________________________________________
Wolves LUG mailing list
Homepage: http://www.wolveslug.org.uk/
Mailing list: Wolves at mailman.lug.org.uk
Mailing list home: https://mailman.lug.org.uk/mailman/listinfo/wolves
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.6.2/784 - Release Date: 01/05/2007
14:57
There might be another way - depending on the file - and if it's just text,
you might be in luck.
sed (as I remember) is stream editor - a sort of find and replace similar
to tr - that's one approach.
Another is awk - which is either just as good (or just as bad) as sed
depending
on your point of view, but my solution (if it works) is much more
straightforward.
If on Window$, open in notepad, copy and paste in Word (not sure if OOo is
similar)
and then save the word file as plain text. I've had this annoying problem
in the past
and I'm sure this is how I got round it. The action of pasting raw text in
seems to
insert line wrap characters. You may need to setup a fixed with font like
courier
before doing the pasting.
If you can invest the time though, writing an awk program is probably the
best bet
without having to go via M$
Cheers
Rob
More information about the Wolves
mailing list