Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formating in real time not from a file.

Status
Not open for further replies.

gindelhe

Technical User
May 23, 2002
9
US
Hello.

I have a script which gets information from a router in real time. I am wondering if it is possible to format this output in real time. Here is what I am looking for:

Input1 Input2 Input3 Input4
123456 xx.xx 123 Time

What I need is for the format to look nice. Have each columns line up correctly etc. Here is an example

Input1 Input2 Input3 Input4
300000 25.50 1 Time of day
80000 25.50 2 Time of day
Etc,etc,etc.

Is this possbile or would I need to change the script I use?

Thanks,
Hal.
 
this kind of thing?

Code:
format STDOUT =
@<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<
$input1         $input2         $input3         $input4
.

$input1 = 300000;
$input2 = 25.50;
$input3 = 1;
$input4 = "midday";

write;

$input1 = 80000;
$input2 = 24.50;
$input3 = 2;
$input4 = "morning";

write;


Kind Regards
Duncan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top