chmod 0755 icq && ./icq
#!/usr/bin/env bash
SETCOLOR_SUCCESS="echo -en \\033[1;32m"
SETCOLOR_FAILURE="echo -en \\033[1;31m"
SETCOLOR_WARNING="echo -en \\033[1;33m"
SETCOLOR_NORMAL="echo -en \\033[0;39m"
${SETCOLOR_SUCCESS}
echo "Connected"
${SETCOLOR_NORMAL}
${SETCOLOR_FAILURE}
echo "Not connected"
${SETCOLOR_NORMAL}
${SETCOLOR_WARNING}
echo "Some warning"
${SETCOLOR_NORMAL}
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
my %ttys;
open my $WHO, '-|', '/bin/who' or die "open() error: $!\n";
while (<$WHO>) {
my ($user, $tty) = split;
push @{$ttys{$user}}, $tty;
}
close $WHO;
#print Dumper(\%ttys);
foreach my $user (sort keys %ttys) {
print "$user: @{$ttys{$user}}\n";
}
<?php
class ClassName
{
function __construct($text)
{
return "sometext $text";
}
function __toString()
{
return 'Чертовы извращенцы.';
}
}
echo new ClassName('new text');