Question: I use an old server without `dos2unix` and I would like to convert files containing Windows-style end-of-line (EOL) to Unix-style EOL. I am unfortunately not the admin so I can't install `dos2unix`. The `tr` method seems to be the only one that works.

```
cp script _p4 && tr -d '\r' < _p4 > script && rm _p4

```

Are there any easier methods to do this?

Answer: 
You can always write a script:

```
#!/bin/sh
for name in "$@"
do
    cp "$name" "$name"~ && tr -d '\r' < "$name"~ > "$name" && rm "$name"~
done

```

and name that `dos2unix`. No compiler is needed.
This command can be used to convert EOL characters without having dos2unix installed:

```
sed -i 's/.$//' script

```