2011-03-20 77 views
1

我在做一個奇怪的問題時ssh。我不知道術語無法匹敵的'是從哪裏來的。我需要做的是運行腳本,記錄我在終端上對文本文件進行的操作。 SSH之後 -ssh&script問題

Sun Microsystems Inc. SunOS 5.8  Generic Patch October 2001 
This is /etc/motd, last updated 3 Feb 2003. 

To learn about the UCS system and other aspects of computing at UL-Lafayette 
visit our home page http://helpdesk.louisiana.edu/ . 

For more information about system use, contact the Help Desk, Stephens 
Hall, Room 201, 482-5516 (x25516), during normal UL office hours; or send 
e-mail to [email protected] 


ATTENTION: 
Unsecure Telnet and FTP will be turned off soon. 
Please make arrange to use ssh or sftp. 
Putty(telnet) and WinSCP(ftp) would be a good replacement. 


Unmatched ` 
d13.ucs.louisiana.edu% bash 
bash-2.04$ script -a myInformation.txt 
Script started, file is myInformation.txt 
Unmatched ` 
d13.ucs.louisiana.edu% 

當我試圖與名稱啓動腳本myInformation.txt,你可以看到我得到的消息 - Script started, file is myInformation.txt。但我再次收到這條消息無與倫比的`和即將出來bash,你可以注意到。問題是什麼 ?任何見解建議將是非常好的。

注意:名稱爲的文件myInformation.txt正在創建中,但沒有任何內容進入它。正如我甚至嘗試運行某些命令,如ls,然後退出腳本與ctrl + d。但是當我打開文件時,什麼都沒有。


的.cshrc

`# @(#)cshrc 1.11 89/11/29 SMI 
if (`uname -s` == "Linux") then 
# /etc/csh.{cshrc,login} set the csh and tcsh environments for Linux 
# We just modify a few here: 
    set history=20 savehist=20 
    exit 0 
endif 

umask 027 

# add here additional directories 
set lpath =() 

set path = (~ ~/bin $lpath /usr/local/bin /usr/ccs/bin /usr/dt/bin /usr/openwin/bin /usr/bin /usr/sbin /usr/ucb .) 

unset lpath 
set noclobber 

# Comment out the next line if you WANT core dumps (to debug via dbx,adb,gdb...) 
limit coredumpsize 0 
# An alternative to the above is to symlink ~/core to /dev/null .... 
# Note that a core file can put you over quota, necessitating a command-line 
# login [pick from the CDE Options menu] to be able to remove it. 

if ($?prompt == 0) exit 
# Put here cmds suitable just for interactive c-shells 

set history=20 savehist=20 time=10 autologout=28800 
#set ignoreeof 
set filec 
set notify 

#alias ls  'ls -F' 
alias mail  mailx 

alias nissql /pkgs2/mysql/bin/mysql -h calvados.ucs.louisiana.edu -u cs4601d -p cs4601_d 

的.login

# @(#)local.login 1.5  98/10/03 SMI 

if (`uname -s` == "Linux") then 
    exit 0 
endif 

if (! $?DT) then 
# Insert HERE and commands that are interactive, or alter the terminal 
# characteristics. Thus, they will be bypassed if you start CDE and your 
# .dtprofile invokes .login. Also remember /etc/.login is run first 
# by non-CDE logins, and already sets some terminal characteristics. 
# -- [email protected] 
    stty -istrip 
endif 

#   environment variables 

#setenv EXINIT 'set sh=/bin/csh sw=4 ai report=2' 
#setenv MORE '-c' 
#setenv PRINTER lw 
setenv RNINIT '-I -e -m -S -i=11 -N -/ -h +hdate +hlines +hfrom -hdate-' 
setenv LESS mQ 
#setenv PRDEPT nnnn 
setenv PAGER /usr/local/bin/less 
#setenv EDITOR /usr/local/bin/emacs 
setenv MANPATH /usr/local/man:/usr/local/perl/man:/usr/dt/man:/usr/openwin/man:/usr/man 
#setenv AB2_DEFAULTSERVER http://pineau.ucs.louisiana.edu:8888/ 
setenv AB2_DEFAULTSERVER http://docs.sun.com:80/ 
setenv H_SPELL /dev/null 

# 
# if possible, start the windows system. Give user a chance to bail out 
# To enable attempting openwin, set try_openwin=1 in the line below: 
set try_openwin=0 
if (`tty` == "/dev/console" && $try_openwin) then 

    if ("$TERM" == "sun" || "$TERM" == "sun-color" || "$TERM" == "AT386") then 

      if (${?OPENWINHOME} == 0) then 
        setenv OPENWINHOME /usr/openwin 
      endif 

      echo "" 
      echo -n "Starting OpenWindows in 5 seconds (type Control-C to interrupt)" 
      sleep 5 
      echo "" 
      $OPENWINHOME/bin/openwin 
      clear   # get rid of annoying cursor rectangle 
      echo -n "Automatically logging out (type Control-C to interrupt)" 
      sleep 5 
      logout   # logout after leaving windows system 

    endif 

endif 
unset try_openwin 
+0

你可能在你的'.bashrc','.bash_profile','.profile'或其他內容中有問題。 – Mat 2011-03-20 08:19:23

+0

@Mat即使當我做'ls -al' – Sayamima 2011-03-20 08:25:24

+0

你還有什麼其他的點文件,我看不到任何這些文件? – Mat 2011-03-20 08:26:20

回答

2

額外'似乎是正確的,在你的.cshrc的開始。

...除了當然如果你正如你所說的運行bash。 ps的輸出是多少?

+0

@IIKa - 保存了一天。謝謝。 – Sayamima 2011-03-20 08:57:44