Nice little script there.
Here is the same with a little fine tuning. (Still based on the SQL from Balaji)
==
tti "Space Usage for Database"
set pagesize 55
col total_mb format 9,999,999.99
col used_mb format 9,999,999.99
col free_mb format 9,999,999.99
col free_% format 999.9
SELECT substr(total.name,1,25) tablspace_name,
total_mb,
(total_mb-free_mb) used_mb,
free_mb,
(free_mb/total_mb)*100 "FREE_%"
FROM
(select tablespace_name, sum(bytes/1048576) free_mb
from sys.dba_free_space
group by tablespace_name
) Free,
(select b.name, sum(bytes/1048576) total_mb
from sys.v_$datafile a, sys.v_$tablespace b
where a.ts# = b.ts#
group by b.name
) Total
WHERE free.tablespace_name = total.name
/
tti off