免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1416 | 回复: 6
打印 上一主题 下一主题

[SCO UNIX] 老法王,请帮一下忙。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-04-07 09:19 |只看该作者 |倒序浏览
老法王,我想请教一个问题。
我们局汇检每天都要进行以下操作
login: epr
password: epr()
epr@usr/epr$ mysql.server start
epr@usr/epr$ su - ssp
password: ssp()
ssp@usr/ssp$cd stlr
ssp@usr/ssp/stlr$export TERM=ansi
ssp@usr/ssp/stlr$stlr
之后进入平台界面,选择启动平台,并输入密码(123456),再选择退出
ssp@usr/ssp/stlr$exit
epr@usr/epr$cd stlr
epr@usr/epr/stlr$export TERM=ansi
epr@usr/epr/stlr$cd 12000000
epr@usr/epr/stlr/12000000$steller
然后就可以进行电子汇兑业务操作了
我想编写一个shell脚本自动执行,请帮我写一下。

论坛徽章:
0
2 [报告]
发表于 2004-04-07 09:39 |只看该作者

老法王,请帮一下忙。

连密码都公开阿

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2022-03-04 22:35:50
3 [报告]
发表于 2004-04-07 10:16 |只看该作者

老法王,请帮一下忙。

我们这里没有这么麻烦,直接epr进入即可。

论坛徽章:
0
4 [报告]
发表于 2004-04-07 17:17 |只看该作者

老法王,请帮一下忙。

那么,老法王,可否告我这个shell如何编写啊。

论坛徽章:
0
5 [报告]
发表于 2004-04-07 21:07 |只看该作者

老法王,请帮一下忙。

http://219.150.0.153:8080

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2022-03-04 22:35:50
6 [报告]
发表于 2004-04-08 08:02 |只看该作者

老法王,请帮一下忙。


  1. epr用户的.profile

  2. :
  3. #        @(#) profile 68.1 98/01/20
  4. #
  5. #        Copyright (C) 1990-1998 The Santa Cruz Operation, Inc.
  6. #                All Rights Reserved.
  7. #        The information in this file is provided for the exclusive use of
  8. #        the licensees of The Santa Cruz Operation, Inc.  Such users have the
  9. #        right to use, modify, and incorporate this code into other products
  10. #        for purposes authorized by the license agreement provided they include
  11. #        this notice and the associated copyright notice with any such product.
  12. #        The information in this file is provided "AS IS" without warranty.
  13. #
  14. # .profile        -- Commands executed by a login Korn shell
  15. #

  16. trap "" 2 3
  17. PATH=$PATH:$HOME/bin:$HOME/mysql/bin:.        # set command search path
  18. export PATH

  19. if [ -z "$LOGNAME" ]; then
  20.         LOGNAME=`logname`                # name of user who logged in
  21.         export LOGNAME
  22. fi

  23. MAIL=/usr/spool/mail/$LOGNAME                # mailbox location
  24. export MAIL
  25. TOPS_PATH=/usr/ssp
  26. export TOPS_PATH
  27. MYSQL_HOME=$HOME/mysql
  28. export MYSQL_HOME
  29. if [ -z "$PWD" ]; then
  30.         PWD=$HOME                        # assumes initial cwd is HOME
  31.         export PWD
  32. fi

  33. if [ -f $HOME/.kshrc -a -r $HOME/.kshrc ]; then
  34.         ENV=$HOME/.kshrc                # set ENV if there is an rc file
  35.         export ENV
  36. fi

  37. # use default system file creation mask (umask)

  38. #eval `tset -m scoansi:${TERM:-scoansi} -m :\?${TERM:-scoansi} -r -s -Q`
  39. #export TERM=vt100
  40. tset -r
  41. # If job control is enabled, set the suspend character to ^Z (control-z):
  42. case $- in
  43. *m*)        stty susp '^z'
  44.         ;;
  45. esac

  46. set -o ignoreeof                        # don't let control-d logout

  47. case $LOGNAME in                        # include command number in prompt
  48. root)        PS1="!# " ;;
  49. *)        PS1='$LOGNAME@$PWD [Teller] ' ;;
  50. esac
  51. export PS1

  52. #set SmartTeller
  53. STLRHOME=$HOME/stlr
  54. export STLRHOME
  55. PATH=$HOME/stlr/bin:$PATH;export PATH
  56. LANG=english_us.8859
  57. #LANG=C
  58. export LANG

  59. TUXDIR=/tuxedo
  60. export TUXDIR

  61. PATH=$TUXDIR/bin:$PATH; export PATH

  62. #WSNADDR=//10.5.4.3:6961
  63. #export WSNADDR

  64. TOPS_HOME=/usr/ssp
  65. TOPS_LIBPATH=$TOPS_HOME/lib
  66. #TOPS_APPLIBPATH=$TOPS_HOME/tsfeesoft/lib
  67. export TOPS_HOME TOPS_LIBPATH TOPS_APPLIBPATH

  68. #LD_LIBRARY_PATH=/usr/lib:/usr/ssp/lib:/usr/ssp/stlr/lib:/usr/ssp/sqldb/lib:/usr/ssp/tsfeesoft/lib
  69. LD_LIBRARY_PATH=$HOME/stlr/lib:/usr/lib:$TUXDIR/lib:$TOPS_LIBPATH:$MYSQL_HOME/lib
  70. export LD_LIBRARY_PATH

  71. alias mysqlci='mysql -u epr -pepr123 epr';
  72. alias rm='rm -i';
  73. alias cp='cp -i';
  74. alias mv='mv -i';
  75. alias sta='cd ${HOME}/stlr/00000000';
  76. alias sh='cd ${HOME}/stlr/20000000';
  77. alias shja='cd ${HOME}/stlr/20121000';
  78. alias shnj='cd ${HOME}/stlr/20121038';
  79. alias shwh='cd ${HOME}/stlr/20121041';
  80. alias shwx='cd ${HOME}/stlr/20121042';
  81. alias etc='cd ${HOME}/stlr/etc';
  82. alias def='cd ${HOME}/stlr/def';
  83. alias usrlib='cd ${HOME}/stlr/usrlib';
  84. alias ll='l';

  85. /usr/bin/prwarn                        # issue a warning if password due to expire


  86. ###########################
  87. # Set Tuxedo client Env
  88. ##########################
  89. . ./tux.env
  90. stty intr ''

  91. # login steller
  92. ./epr
  93. find /usr/hdfile/tmp -type f|grep -v '.tmp'|xargs rm -f
  94. find /usr/hdfile/exdata -type f|grep -v '.tmp'|xargs rm -f
  95. exit
复制代码


  1. 调用的epr文件:


  2. rm -f exit.sql
  3. echo ";" >; exit.sql

  4. nohup mysql -u epr -pepr123 epr < exit.sql >; /dev/null

  5. if [ $? -ne "0" ]
  6. then
  7.         rm -f exit.sql
  8.         mysql.server start& >; /dev/null
  9.         echo "启动数据库成功,请启动安全平台"
  10.         echo " "
  11.         sleep 3
  12.         exit 0
  13. fi

  14. rm -f exit.sql

  15. clear

  16. echo "*****************************************************************"
  17. echo "*                                                               *"
  18. echo "*               欢迎进入中国邮政电子汇兑系统                    *"
  19. echo "*                                                               *"
  20. echo "*****************************************************************"

  21. echo " "
  22. echo " "
  23. echo "请输入您要登录的机构号:"
  24. read ORGID

  25. if [ -d $HOME/stlr/$ORGID ]
  26. then
  27.         cd $HOME/stlr/$ORGID
  28.         steller
  29. else
  30.         echo "该机构号不存在, 请重新登录"
  31.         exit 1
  32. fi
  33. TERM=vt100
  34. export TERM
  35. exit 0

复制代码

论坛徽章:
0
7 [报告]
发表于 2004-04-08 21:49 |只看该作者

老法王,请帮一下忙。

谢了,山东大哥,你的程序我有许多地方还看不懂,我现在就去读它了,再次谢了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP