[Newbies] mucking around in .changes file on linux/ubuntu
David T. Lewis
lewis at mail.msen.com
Sun Feb 14 13:41:19 UTC 2010
On Sat, Feb 13, 2010 at 10:26:13PM -0800, Jerome Peace wrote:
>
> Hi all,
>
> At some point in making and finding bugs, I am left with having to pick up pieces. On my mac I could always just read the whole changes file into a text editor and extract manually the tail bit.
>
> Having moved on to Ubuntu 8.04 my tools don't seem to match my needs.
>
> The Gedit editor refuses to read the text because it is in a format it can't decode. It tries Utf-8 and latin1.
>
> The Emacs editor will gladly read in the file but because the line endings are cr rather than crlf I get a file all on one line.
>
> My emacs skills are rusty so I've not figured out what to do next.
>
> Is there anyone out there who has deal with changes files and linux editors? What might work most elegantly or robustly?
>
> Yours in curiosity and service, --Jerome Peace
>
I use a local one-liner shell script that I call "sqcat":
#!/bin/sh
cat $* | tr '\015' '\012'
And another called "sqless"
#!/bin/sh
sqcat $* | less
These are handy for viewing Smalltalk formatted files from the unix
command line.
If I have a scrambled image and want to edit the end of the changes
with a vi editor, I do this:
$ sqcat squeak.changes | tail -4000 > changes.txt
The puts the last 4000 lines of the changes file into a text file
for editing.
When I am ready to to use the text file in Squeak, I use a file
browser and do the "remove line feeds" menu option before using
the file.
Dave
More information about the Beginners
mailing list