[WEB4LIB] robots.txt file: Unix linebreaks

John Creech creechj at mumbly.lib.cwu.edu
Thu Dec 2 13:40:14 EST 1999


On Thu, 2 Dec 1999, SUSIE BREIER wrote:

> how can I ensure that the line endings are (and remain) Unix
> <LF>? I have been sent a file with the correct line endings by the
> administrator, but am afraid that if I save the file with BBedit again (or
> any other Mac or windows wordprocessor for that matter) in order to put
> it on our server, the linebreaks will revert back to MacOS.

Hi Susie. Do you or does anyone on your library staff have access to a
Unix machine?  What is your website running on? If you do have access you
can clean up files with the tr command: 

tr '\015' '\012' < oldfile > newfile

This will strip out the <CR>s.  Or one could take that command and write a
simple shell script that will execute through entire directories and do
the same thing. 

John Creech
Electronic Resources & Systems Librarian
Central Washington University Library 
400 E. 8th Ave. | Ellensburg, WA 98926 | 509-963-1081
creechj at www.lib.cwu.edu






More information about the Web4lib mailing list