写一script
#!/usr/bin/sh dbaccess nmosdb << !! unload to "/tmp/abc.txt" select * from admin:table_name !!
在informix用户下执行即可