I've been trying to write the date and my local IP to a file in ubuntu with a cron job. This is what I have tried:

```
echo date >> /home/ccpadmin/dls/ip.txt | echo ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' >> /home/ccpadmin/dls/ip.txt | echo "\r\n" >> /home/ccpadmin/dls/ip.txt

```

But the newlines don't work, and it doesn't have the date in the file. Please help.