On Jan 12, 6:21 pm, MRAB wrote:
> On 12/01/2012 22:26, Denhua wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I've got a file which I'd like to read, modify and write.
>
> > # file contents
> > a
> > b
> > c
> > d
>
> >
Hi,
I've got a file which I'd like to read, modify and write.
# file contents
a
b
c
d
My script reads the file contents into a list and rotates the list and
writes it back to the same file.
Problem is that the output contains null characters. I don't know
where they are coming from.
#!/usr/bin/