/[informatika.old]/print/print.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /print/print.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by dpavlin, Fri Jun 2 07:07:27 2000 UTC revision 1.7 by dpavlin, Thu Feb 15 08:35:22 2001 UTC
# Line 37  chomp $db_user; Line 37  chomp $db_user;
37  $db_user=~s/\s.+$//g;   # OSF obriši sve iza logina  $db_user=~s/\s.+$//g;   # OSF obriši sve iza logina
38  $db_user=~s/^[^!]+!//g; # Linux obriši hostname  $db_user=~s/^[^!]+!//g; # Linux obriši hostname
39  close(WHO);  close(WHO);
40    if ($db_user eq "") {
41            open(ID,"id |") || die "id: $!";
42            my $foo=<ID>; chomp $foo;
43            if ($foo=~/uid=\d+\((\w+)\)/) {
44                    $db_user=$1;
45            } else {
46                    die "can't locate who is local user!";
47            }
48    }
49    
50  open(HOSTNAME,"hostname |") || die "hostname: $!";  open(HOSTNAME,"hostname |") || die "hostname: $!";
51  my $hostname=<HOSTNAME>;  my $hostname=<HOSTNAME>;
# Line 70  $sth = $dbh->prepare("$sql") || die "$sq Line 79  $sth = $dbh->prepare("$sql") || die "$sq
79  $sth->execute() || die "$sql ",$sth->errstr();  $sth->execute() || die "$sql ",$sth->errstr();
80    
81  #my $out_tex="out.tex";  #my $out_tex="out.tex";
82  my $out_tex="$0-out-$$.tex";  my $out_tex="out-$$.tex";
83    
84  open(IN,"obavjest.tex") || die "obavjest.tex: $!";  open(IN,"obavjest.tex") || die "obavjest.tex: $!";
85  open(OUT,"> $out_tex") || die "$out_tex: $!";  open(OUT,"> $out_tex") || die "$out_tex: $!";

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.26