I have the following textfile :
#!/bin/bash
clear
echo "Hello $USER"
echo "Today is ";date
echo "Number of user login :" ; who | wc -l
cal
exit 0
I am trying to print words from the textfile out in
different colors. Below is my php script :
<?
$text = file("file.txt");
foreach($text as $value) {
if($value=="echo") {
echo "<font color=blue>$value</font><br>";
}
elseif($value=="cal") {
echo "<font color=green>$value</font><br>";
}
elseif($value=="clear") {
echo "<font color=brown>$value</font><br>";
}
elseif($value=="exit") {
echo "<font color=gray>$value</font><br>";
}
else {
echo "<font coor=black>$value</font><br>";
}
}
?>
This unfortunatly doesnt work. Would greatly apreciate
help on this