📄 ia64_dump.pl
字号:
#!/usr/bin/perl## $Id: ia64_dump.pl,v 1.3 2000/10/11 19:55:39 tperdue Exp $## dump_database.pl - script to dump data from the database to flat files so the ofher perl# scripts can process it without needing to access the database.use DBI;require("../include.pl"); # Include all the predefined functionsmy $user_array = ();&db_connect;# Dump the users Table informationmy $query = "select unix_uid, unix_status, user_name, shell, unix_pw, realname from users where unix_status != \"N\"";my $query = "select users.unix_uid, users.unix_status, users.user_name, users.shell, users.unix_pw, users.realname from users,intel_agreement where users.unix_status != 'N' AND users.user_id=intel_agreement.user_id AND intel_agreement.is_approved='1'";my $c = $dbh->prepare($query);$c->execute(); while(my ($id, $status, $username, $shell, $passwd, $realname) = $c->fetchrow()) { $home_dir = $homedir_prefix.$username; $userlist = "$id:$status:$username:$shell:$passwd:$realname\n"; push @user_array, $userlist;}# Now write out the fileswrite_array_file($file_dir."ia64_dump", @user_array);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -