ia64_dump.pl

来自「GForge 3.0 协作开发平台 支持CVS, mailing lists, 」· PL 代码 · 共 31 行

PL
31
字号
#!/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 + =
减小字号Ctrl + -
显示快捷键?