cat employees.txt

byoungguk:100:server
gildong:200:sales


cat read-employees.sh

#!/bin/sh
IFS=:
echo "employee names:"
echo "---------------"
while read name empid dept
do
     echo "$name is part of $dept department"
done < ~/employees.txt




./read-employees.sh
employee names:
---------------
byoungguk is part of server department
gildong is part of sales department






저작자 표시 비영리 동일 조건 변경 허락
신고

WRITTEN BY
김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

받은 트랙백이 없고 , 댓글이 없습니다.
secret

관리자 페이지를 만들었는데, 페이지 링크를 클릭하여 새창을 띄웠습니다.

내부 페이지를 클릭 할 경우 닫히도록 할려고 합니다.

아래 방법을 이용했습니다.

첫번째,
body 쪽에 넣으면 됩니다.
win.document.write(" onclick='self.close();')

그런데 문제는 파이어폭스에서 잘되는데 익스에서는 동작을 안하네요.

onclick 앞에 공백이 있어야 합니다. 익스6,7에서 잘동작합니다.
그런데 익스7은 다이얼로그 닫기 박스가뜨네요.

그래서 최종적으로,

<Script>
function selfClose()
{
if (/MSIE/.test(navigator.userAgent)) {
if(navigator.appVersion.indexOf("MSIE 7.0";)>=0) {
//IE7에서는 아래와 같이
window.open('about:blank','_self').close();
}
else {
//IE7이 아닌경우
window.opener = self;
self.close();
}
} else {
window.opener = self;
self.close();
}
}
</Script>

그리고 <BODY 에 onclick='selfClose()' 이거 추가합니다.
신고

WRITTEN BY
김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

받은 트랙백이 없고 , 댓글  3개가 달렸습니다.
  1. 파이어폭스에서 잘되는데 익스에서는 동작을 안하네요.
  2. onclick 앞에 공백이 있어야 함. 익스6,7에서 잘동작함.
    그런데 익스7은 다이얼로그 닫기 박스가뜨네요.
  3. <Script>
    function selfClose()
    {
    if (/MSIE/.test(navigator.userAgent)) {
    if(navigator.appVersion.indexOf("MSIE 7.0";)>=0) {
    //IE7에서는 아래와 같이
    window.open('about:blank','_self').close();
    }
    else {
    //IE7이 아닌경우
    window.opener = self;
    self.close();
    }
    } else {
    window.opener = self;
    self.close();
    }
    }
    </Script>

    그리고 <BODY 에 onclick='selfClose()' 이거 추가..
secret


  1. Ensure that your Linux virtual machine is powered on.
  2. If you are running a GUI interface, open a command shell.

    Note: Log in as a root user, or use the sudo command to complete each of these steps.
  3. Click VM in the virtual machine menu, then click Guest > Install/Upgrade VMware Tools and click OK.
  4. To create a mount point, run:

    mkdir /mnt/cdrom
  5. To mount the CDROM, run:

    mount /dev/cdrom /mnt/cdrom
  6. To copy the Compiler gzip tar file to a temporary local directory, run:

    cp /mnt/cdrom/VMwareTools-<version>.tar.gz /tmp/

    Where <version> is the VMware Tools package version.
  7. To change to the tmp directory and extract the contents of the tar file into a new directory called vmware-tools-distrib, run:
    • cd /tmp
    • tar -zxvf VMwareTools-<version>.tar.gz
  8. To change directory to vmware-tools-distrib and run the vmware-install.pl PERL script to install VMware Tools, run:
    • cd vmware-tools-distrib
    • ./vmware-install.pl

      Notes:
      • Follow the screen prompts to install the VMware Tools. Options in square brackets are default choices and can be selected by pressing Enter.
      • To compile VMware Tools successfully, you need gcc Compiler and Linux Kernel sources provided by your Linux distribution. Consult your Linux distribution documentation for details on how to install these packages.
      • It is normal for the console screen to go blank for a short time during the installation when the display size changes.
      • Some warnings or errors are normal, like when a files does not exist.
      • Depending on the Linux distribution, your network service might restart after installation. VMware recommends that you invoke this command from the console and not remotely.
  9. If you are running a GUI interface, restart your X Window session for any mouse or graphics changes to take effect.
  10. To start VMware Tools running in the background during an X Window session, run:

    /usr/bin/vmware-toolbox &
  11. Depending on your environment you may need to unmount the CDROM. To unmount the CDROM, run:

    umount /mnt/cdrom
  12. Depending on your environment, you may need to manually end the VMware Tools installation. To end the VMware Tools install, click VM in the virtual machine menu, then click Guest > End VMware Tools Install.

 

저작자 표시 비영리 동일 조건 변경 허락
신고

WRITTEN BY
김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun

받은 트랙백이 없고 , 댓글이 없습니다.
secret