免费注册 查看新帖 |

Chinaunix

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

OpenVMS Commands with unix equivalents [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-03 10:01 |只看该作者 |倒序浏览
OpenVMS Commands with unix equivalents
OpenVMS                         unix            Explanation/examples
=========================================================================
APPEND                          cat             Concatenates files.  If contents of file1 need to be
                                                placed at the end of file2 issue the following unix
                                                command:   cat file1 >> file2
ASSIGN or DEFINE                =               (Bourne & Korn)set (C shell)   
                                                in Bourne or Korn shell:
                                                    DIR = lsin C shell set DIR ls
ATTACH                          fg      
BACKUP                          tar or pax      back up files into a tar file.
  /INIT                         tar -c or pax   Restore files.
  /LIST                         tar -t          List contents.
  /LOG                          tar -v          Report progress.
  /NOREWIND                     tar -r          Write at end of existing backup (tar) files.
  /RECORD                       tar -m          Update file^ҳ modification date upon restore.
COPY                            cp              Copy a file
COPY                            scp             Copy to/from a nontrusted remote host.
                                                e.g. $ scp2 foo.txt "tcarroll@nstxpool::/u/tcarroll"/translate_vms
COPY                            rcp             Copy to/from a remote host.
COPY /CONFIRM                   cp -i           Confirm before copying.
CREATE                          touch           Create or update a file.
  /DIRECTORY                    mkdir           Create a subdirectory.
CREATE filename                 cat  file     Create a file and write a string or the contents of a variable to it.
WRITE                           /bin/echovar >> file    Append a string or the contents of a variable to an existing file.
WRITE SYS$OUTPUT                echo (c Shell)print (Korn)      Write to standard output.
OpenVMS Lexical Function and unix Equivalents
=============================================
OpenVMS                                 unix            Explanation
F$ENVIRONMENT("INTERACTIVE")            tty -s          Determine if you are an interactive user.
F$EXTRACT(start, length, string)        cut -c          Locate fields in a test string and write them out.
F$ELEMENT(element#, delimiter, string)  cut -f -d awk   Locate delimited fields in a test string.
F$ENVIRONMENT("PROCEDURE")              $0 (Korn)$arg [0] (C)   Get name of currently executing script.
F$TRANSLATE("SYS$SYSDEVICE")            sizer -r        Get name of the device from which the operating system bootstrapped.
F$GETDVI("TT:", "DEVNAM")               tty -s          Determine the name of the terminal you are using.
F$GETSYI("HW_NAME")                     sizer -c        Get model name of the CPU
F$GETSYI("HW_MODEL")F$GETSYI("CPU")     sizer -wt       Return workstation device type
F$GETSYI("PHYSICALPAGES")               uerf -r 300 -R | grep physical (+2)wc -c/dev/mem        Get the physical memory on a system.
F$GETSYI("BOOTTIME")                    who -b  Get system boot time.
unix Branching statements
DCL command procedures rely on the statements if, gosub, call, and goto for program branching.  
The shells under unix offer several branching statements.
Shell   Branching Statements Offered
====================================
csh     if, goto, while, foreach, switch, shift
ksh     do, case, elif, for, function, if, select, time, until, while
sh      if, for, while, until, case
Debugging Shell Scripts
Debugging of shell scripts is done by invoking ksh or sh scripts with the -x and -v flags.  
Debuging of C shell scripts by invoking them with the -v, -V, -x or -X flags.  
The result is like using the OpenVMS command set verify.
(from http://www.physnet.uni-hamburg.de/physnet/vms-unix-commands.html)
Other VMS/Unix links include:
General Unix Help pages include:



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/20110/showart_290855.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP