[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Dynamic IP script output from df or mount formatting problem.



Hi all,

I have been playing with a script that works out your WAN / external
IP address then uploads it to a web site every hour, so when I am at
work and my provider changes my IP address I can look up what it has
changed too.

This script has been rewritten several times now and I now have an
html generated page that is starting to be functional with other
useful info HOWEVER,

I cannot get the output from a df, mount or even fdisk to work as html
because the text output from the commands contain no end of line
control codes so instead of the output looking like

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda3              8854472   7175844   1221580  86% /
/dev/hda1               101086     21616     74251  23% /boot
tmpfs                   127908         0    127908   0% /dev/shm

it looks like this with a word wrap, can any one show me how this is
resolved with a small script or command to pipe it though.

Filesystem Size Used Avail Use% Mounted on /dev/hda3 8.5G 6.9G 1.2G
86% / /dev/hda1 99M 22M 73M 23% /boot tmpfs 125M 0 125M 0% /dev/shm

Thanks

Paul


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]