Eclipse에서 Subversion을 설치하면 최근에 Update된 1.8.9버전이 설치 됩니다.

하지만 문제는 JavaHL의 설치 버전이 문제입니다. 예전 Subversion 1.6.x일 때는 JavaHL의 버전역시 1.6.x만 있으면 되었습니다.

그러나 Subversion의 버전이 1.8.x일 때는 JavaHL 버전이 1.7.x 이상이여야 한다는 것이 문제가 됩니다.

왜냐하면 시냅틱관리자(필자는 Ubuntu 12.04를 사용하고 있습니다.)에서 설치하는 JavaHL인 libsvn-java의 버전이 1.6.x이기 때문이다.

그래서 이렇게 저렇게 뒤져본 결과 그리고 설치한 결과를 이렇게 남겨봅니다.


1. JavaHL 1.7.x를 구하기...

우선 JavaHL 1.7.x를 구해야 합니다. 아래에 파일을 첨부해 놓겠습니다.

왜냐하면 Collab사이트에서 구하려고 하니 회원 가입을 해야해서요.....좀 짜증이.....^^

뭐 그래도 받으시려거든 아래 주소로 가시면 받으실 수 있습니다.......^^

JavaHL 1.7.x를 다운 받는 사이트JavaHL 1.7.x를 다운 받는 사이트


아니면 다음 링크에서 다운 받으셔도 됩니다.

뭐 버전별로 받으시면 됩니다. 386버전이 deb가 없는 것은 제 운영체제가 amd64버전이다 보니 386버전으로는 리패키지가 않되더군요........^^ 하지만 아주 간단한 방법을 알려 드리겠습니다.


잠시 삼천보로.....


rpm버전을 deb로 변경하는 방법입니다.

alien을 먼저 설치해야 합니다.

$ sudo apt-get install alien

$ sudo alien -c *.rpm

rpm을 deb로 변경하는 화면rpm을 deb로 변경하는 화면


다시 돌아 와서....


일단 설치를 합니다.-저는 deb파일로 설치를 했습니다.

설치를 하고 나면 /opt/CollabNet_Subversion 설치가 됩니다.

그리고 여기에 보면 설치 후에 어떻게 해야 할 지나와있습니다.

제가 일전에 Ubuntu에서 svn 설치하는 것에 보면 eclipse.ini에  

-Djava.library.path=/usr/lib/jni(amd64일 -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni)를 입력해야 한다고 알려 드렸었습니다. "libsvnjavahl-1.so"이게 필요하니까요......^^ 


근데 subclipse사이트에서는 이 부분을 "-Djava.library.path=/opt/CollabNet_Subversion/lib"이렇게 넣어 달라고 하더군요......^^


바꿨더니.....아무런 문제가 없이 Eclipse가 잘 구동이 되는군요.....^^

Eclipse Configure에 추가된 JavaHL 1.7.4 버전Eclipse Configure에 추가된 JavaHL 1.7.4 버전


마무리...

^^ 조금 어려우시죠?? ㅡ.ㅡ;;;;;; 저도 그렇답니다....

하지만 해결된 것에 감사해야 겠죠.....

이런 부분은 어떻게든 Ubuntu의 미래를 위해서 개선되어지기만을 바라는 점입니다......






Posted by gofly

댓글을 달아 주세요

얼마전에 구글에서 Cloud서비스를 시작했죠.....바로 구글 드라이브 입니다.

구글 Docs를 변형한 것 같다는 것이 저의 생각인데....뭐 그래도 새롭게 시작하는 서비스(요즘 안드로이드 마켓도 플레이라는 이름으로 서비스 명을 바꿨드랬죠....)니 만큼 이렇게 소개를 해보려고 합니다.

우선 브라우저에서 dirve.google.com 을 치시면 아래와 같은 화면이 나옵니다.


구글 드라이브 시작

언제나 처럼 서비소개 화면은 항상 똑 같은 것 같습니다.

구글 드라이브 첫 화면구글 드라이브 첫 화면


상단에 파란색 버튼으로 "Google 드라이브로 이동"이라는 문구를 클릭합니다.


드라이브로 이동했을 때 첫 화면드라이브로 이동했을 때 첫 화면


그럼 위와 같은 화면이 보입니다. 여기서도 파란색 버튼으로 "Google 드라이브 사용해 보기"를 클릭합니다.


익숙한 구글 Docs의 화면 하지만 드라이브로 변경익숙한 구글 Docs의 화면 하지만 드라이브로 변경됨


그러면 아주 익숙한 화면이 보입니다. 바로 구글 Docs의 화면이죠.....^^

아까 위에서 구글 Docs를 이름만 변경한 것 같다는 말은 바로 위의 화면 때문입니다. 구글 Docs를 써보신 분은 아시겠지만 뭐 별 다른게 없습니다.

어찌 되었든 위의 화면은 구글 Docs의 상단 화면인데.....저렇게 드라이브 소개글이 나오는데 여기에서 선택을 하셔야 합니다. 바로 PC와 구글 드라이브에 있는 문서들을 동기화 할 것인지 아니면 그냥 웹에서만 사용할 것인지 말입니다.

다음 화면에서 부터는 PC에서 Google드라이브 사용하려고 할 때 진행되는 화면입니다.


PC에서 구글 드라이브 사용하기.

위에 그림을 보면 "PC용 Google 드라이브 다운로드"를 누르면 아래호면이 나옵니다.

윈도우용 구글 드라이브 화면윈도우용 구글 드라이브 화면


물론 이 화면에서 "Accept and Install"버튼을 누릅니다. (요즘 구글은 파란색으로 색을 밀고 있나봅니다. 모든 긍정의 버튼은 파란색이네요....^^)
자 "Accept and Install"을 누르면 아래 화면이 나옵니다. 로컬컴퓨터에 구글드라이브 전용 싱크 프로그램을 다운 받습니다.


구글 드라이브 싱크 프로그램구글 드라이브 싱크 프로그램


파일을 로컬에 다운받아서 저장하고 실행을 하면 아래와 같은 화면이 나타납니다.


PC용 구글 드라이브 설치 화면PC용 구글 드라이브 설치 화면(Win)


설치를하고 나면 아래와 같이 로그인 화면이 뜹니다.

그러니까 구글 계정은 당연이 있어야 하겠죠^^


설치 후 구글 로그인 화면...설치 후 구글 로그인 화면...


로그인 하고 나면 아래와 같이 2페이지 정도 Welcome화면이 나옵니다.


웰컴 화면 1웰컴 화면 1


웰컴 화면 2웰컴 화면 2


대충 넘어가고 마지막 페이지에 오면 "Advanced Setup"을 누르면 어디에 파일들을 싱크할 것인지 설정할 수 있습니다.


Advanced Setup화면Advanced Setup화면


설정이 끝나고 "start sync"를 누르면 아래 화면과 같이 구글 드라이에 있는 저의 문서가 로컬 파일로 저장되어지는 것을 볼 수 있습니다.


다운로드된 구글드라이브 내의 저의 문서다운로드된 구글드라이브 내의 저의 문서


마무리


마지막으로 아직 갈길이 많겠지만.....

구글이 새로운 아이디어가 없어 졌다는 느낌을 불식 시켜줄 구글 Wave같은 것들을 계속 발표헀으면 하는 개인적인 소견입니다.

왜냐하면 요즘 이름만 바꿔서 서비스를 하는 느낌이 들어서 좀 그렇네요.....오라클이 태클을 걸어와서 외부적으로 신경이 쏠려 있는 것은 이해하지만 구글이 구글다웠으면 하는 바램입니다.....^^













'Software Story > Google' 카테고리의 다른 글

구글드라이브 오프라인 설정하기  (0) 2012.06.29
Google Drive - 구글 드라이브  (5) 2012.05.02
Posted by gofly

댓글을 달아 주세요

  1. BlogIcon hwang5236 2012.09.25 07:32  댓글주소  수정/삭제  댓글쓰기

    이 글 보고 그대로 따라하는데요
    설치하고나서 로그인화면이 뜨지 않습니다.
    설치하고 프로그램 실행해도 아무것도 안뜨는데요
    어떻게 하면 좋을까요?

    • Favicon of https://belong2jesus.tistory.com BlogIcon gofly 2012.09.25 10:59 신고  댓글주소  수정/삭제

      제가 글 쓸 때와 많이 달라졌을 수 있겠네요;;;
      설치 후에 하단에 Tray Bar에 구글 드라이브 표시가 뜨실꺼에요...반투명하게요...거기서 로그인 하셔도 됩니다....^^;;;; 역시 오른쪽 클릭하면 "로그인"이 보이실 겁니다....

    • 로몬 2012.09.28 14:12  댓글주소  수정/삭제

      라이센스를 미리 취득해야 한다네요.
      저도 로그인창은 커녕 트레이에 아이콘도 뜨질 않네요;

    • Favicon of https://belong2jesus.tistory.com BlogIcon gofly 2013.01.31 10:30 신고  댓글주소  수정/삭제

      아....그래요?? 라이센스 동의하는 것 말인가요??
      제가 할 때는 그런게 없었는뎅;;;;; 헐;;;;;;

  2. ㅇㅇ 2013.07.04 16:41  댓글주소  수정/삭제  댓글쓰기

    컴퓨터 포멧했는데 즐겨찾기에 추가를 할 수가 없네요 ; 예전처럼 컴퓨터 즐겨찾기 파일 열어서 재깍재깍 쓰고 싶은데...

얼마전 저는 Ubuntu 12.04를 설치 후에 개발환경 구축을 위해서 JAVA JDK 7을 설치했습니다.

ppa에 Oracle-java7-installer를 추가하고, 설치를 하려고 했는데, 인스톨 스크립트에서 에러가 나는지 계속 설치가 않되는 것이다.

뭐, 반대로 삭제는 두말할 것도 없이 삭제가 않되었습니다. 

패키지 설치/삭제시 에러메세지프로그램을 설치하거나 삭제시에 나타나는 메세지 화면


그래서 이것 저것 찾다가 강제로 삭제하는 방법을 알아 내서 이렇게 Posting을 합니다.

첫째는 dpkg 폴더에 있는 status파일을 수정합니다.


$ cd /var/lib/dpkg

$ sudo vi status


그리고 삭제하려고 하는 패키지의 이름을 찾습니다.(vi 에디터에서 글자 찾기는 "/"를 누르고 /다음에 prompt가 뜨면 찾고자 하는 글귀를 치고 엔터를 누릅니다.)


삭제할 패키지를 status찾습니다status 파일에서 삭제하고자하는 Package를 찾습니다.


그리고 찾아지는 패키지에대한 내용들이 있으면 삭제를 합니다. 삭제방법은 다음과 같이 하시면 됩니다. 


패키지를 삭제하는 예시패키지를 삭제하는 예시


위의 내용은 우분투 한국커뮤니티에 올라와있는 그림을 참고해온 것입니다.

삭제시 주의점은 간단합니다. 삭제를 할 때 저의 경우에는 vi 에디터에서 줄을 하나씩 지울 때 "d"키를 두 번씩 눌르면 됩니다. 그런데 지우실 때 어디까지 지워야 할지 모를 수가 있습니다. 그래서 다음 설명을 잘 보셔야 합니다.

지우는 부분은 Package에서 부터 다음 Package라는 구문이 나오기 전까지 입니다.

 Package: oracle-java7-installer <==여기서 부터
-내용-
-내용-
-내용-
-내용-
-내용-
-내용-<==여기까지

Package: qt4-qtconfig

위와 같이 Package정보가 여러가지가 존재 합니다. 그 중에 강제로 삭제를 하려고하는 Package만 삭제하시면 됩니다.

위의 설명 처럼 Package만 삭제하면 됩니다. 저의 경우에는 oracle-java7-installer를 지워야 하기 때문에 oracle-java7-installer package에 대한 내용을 모두 삭제하고 저장하고 vi에디터를 빠져 나옵니다. 다음으론 available파일도 수정을 합니다.


$ sudo vi available


이 파일에서도 위에서 status파일에서 했던 것과 동일하게 지우시고자 하는 Package를 찾아서 삭제하고 저장하고 파일에서 나옵니다.

다음은 설치되어있는 것들을 찾아내서 삭제해야 합니다. 저는 패키지 이름이 oracle-java7-installer이기 때문에 아래와 같이 {패키지 이름}.list를 찾아서 내용을 확인합니다. 여기서 어디에 oracle-java7-installer에 관련된 파일들이 깔려 있는지를 볼 수가 있습니다.

$ sudo vi /var/lib/dpkg/info/oralce-java7-installer.list


이렇게하면 아래와 같이 해당 패키지의 리스트 정보를 보여 줍니다.<아래는 단지 참고 화면입니다.>


dpkg info에 깔려 있는 패키지의 Deploy정보dpkg info에 깔려 있는 패키지의 Deploy정보


주의 하셔야 할 것은 폴더는 삭제하시면 안된다는 것입니다. /usr/share/doc/ 아래에 있는 것만 빼고요.....^^

*.desktop 파일이나 *.png, *.xpm등은 물론 tar파일 zip, gzip 파일들을 모두 삭제합니다. 찾아서 삭제하셔야 합니다.

자 이제는 *.list와 같은 것들을 찾아 삭제합니다.


$ sudo rm oracle-java7-installer.list oracle-java7-installer.postinst oracle-java7-installer.prerm oracle-java7-installer.md5sums oracle-java7-installer.postrm 


자 이것만 하고 나면 일단 모든 것을 수동으로 삭제했습니다. 자 이제는 apt-get 명령어를 이용해서 패키지에 대해서 clean을 해줍니다.


$ sudo apt-get clean

$ sudo apt-get update

$ sudo apt-get upgrade


여기까지 했으면 수동으로 잘못된 패키지를 모두 삭제한 것입니다.

뭐 저에 경우에는 이 이후로 에러메세지는 않뜨네요^^ ㅋㅋㅋㅋㅋ

그런데 조금 문제가 있네요. 리눅스가 발전하기 위해서는 이런 부분들이 조금더 편하게 할 수 있도록 바꾸는 것이 필요 한 것 같네요.



출처 : http://ubuntu.or.kr/viewtopic.php?p=36847


Posted by gofly

댓글을 달아 주세요

  1. Favicon of https://belong2jesus.tistory.com BlogIcon gofly 2012.05.04 01:04 신고  댓글주소  수정/삭제  댓글쓰기

    그런데 좀 문제가 있네요.....;;;;; 의존성이 있는 패키지는 일일이 다 찾아서 지워야 하는 것 같은데.....잘못 지우면 패키지를 영영 돌이킬 수 없는 상황으로........아마 내일 Ubuntu를 다시 깔아야 할 것 같네요^^;;;;; ㅎㄷㄷ;;;;;;

  2. 5my갓 2012.07.16 18:23  댓글주소  수정/삭제  댓글쓰기

    읔 .. 다시 까는중 ㅜ ㅜ
    여튼 좋은 정보 감사합니다. ~

필자는 구글 호스팅에서 SVN으로 프로젝트 소스들을 버전관리하고 있다.

해서 항상 Eclipse를 깔면 SVN을 설치하고 소스를 내려 받아 작업을 한다.

최근에 Ubuntu 12.04 LTS(The Precise Pangolin)에서는 한글 문제가 해결 되었다는 소식을 듣고

아직 Beta 2지만 바로 설치를 하였다.

그리고 Eclipse를 깔고 SVN을 설치 하였는데, Java HL Not Available이라고 나오며 Connector를 못찾아서

방법을 찾아 보니 시냅틱 패키지 관리자에서 subversion을 깔고 libsvn-java을 깔고나서

eclipse.ini에 -Djava.library.path=/usr/lib/jni 을 추가해도 계속적으로 Eclipse를 구동하면 lib를 못찾았다고 나오는 것이다.

그래서 찾아 보니 "libsvnjavahl-1.so"이녀석이 있어야 한다고 하는데 /usr/lib/jni폴더에는 엉뚱한 .so파일만 있지

정작 필요한 "libsvnjavahl-1.so"은 보이지 않는 것이다.


그래서 이 녀석이 어디있나 찾아 봤더니 바로 "/usr/lib/x86_64-linux-gnu/jni"에 있는 것이었다.

그래서 기존에 알려져있는 "/usr/lib/jni"에서 "/usr/lib/x86_64-linux-gnu/jni"을 바꿔서 eclipse.ini에 추가해주면 

아무 문제 없이 SVN이 구동되는 것을 환인했다.


기존 libsvnjavahl-1.so     위치 -Djava.library.path=/usr/lib/jni

변경된 libsvnjavahl-1.so 위치 -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni


예! - 꼭 -vmargs 다음에 입력해 주세요!!!^^

-vmargs

-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni

-Xverify:none

-Dosgi.requiredJavaVersion=1.6

-XX:+UseParallelGC

-XX:-UseConcMarkSweepGC

-XX:+AggressiveOpts

-Xms1024m

-Xmx1024m


아! 그리고 내 생각에 폴더명에 x86_64라고 쓰여있는 걸로 봐서 ia32-lib이 설치되어있어야 하는거 아닌가 생각하게 되었다.

Posted by gofly

댓글을 달아 주세요

Bumblebee 3.0 Nvidia Optimus GPU Switching For Linux has been Released on January 19, 2012. The Bumblebee Project proudly presents version 3.0 of Bumblebee, a project aimed to support NVIDIA Optimus technology under Linux


Actually, Nvidia Optimus GPU switching is officially only supported on Windows 7, but the Team Bumblebee Project also provide for Linux too. Great job Bumblebee Project 

Nvidia Optimus technology is available for notebooks or laptops that are used to increasebattery life by switching OFF dedicated GPU when it’s not necessary and then switch ON again when needed. When a dedicated GPU from integrated graphics chip that is used. Nvidia Optimus

Here it is the release higligth of Bumblebee 3.0 :

  • acpi_call has been replaced with bbswitch and vga_switcheroo
  • Nouveau support for the Ubuntu PPA package
  • Automatic power management which also survives suspend
  • Improved error detection and reporting
  • Better system integration
  • “optirun –status” will now show the current status of Bumblebee and the secondary GPU on your system
  • Xorg configuration greatly simplified, provided defaults usually work out of the box.
  • Server / client re-written in C which provides increased performance and reliability
  • Automatic power management which also survives suspend
  • Improved error detection and reporting
  • Better system integration
  • Switch to Upstart startup mechanism
  • You can found Complete changelog of Bumblebee 3.0 here

How to install Bumblebee 3.0 “Tumbleweed” on Ubuntu 11.10 Oneiric Ocelot

To install Bumblebee 3.0 “Tumbleweed” on ubuntu 11.10 see follow guide below:

Open terminal and add ppa Bumbleebe ”Tumbleweed”, then install

sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee 

You may also want to use newer drivers (particularly if having recent hardware), then run this before installing Bumblebee:

sudo apt-get purge nvidia-current
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

After installation, allow yourself to use Bumblebee (replace $USER by your username):

sudo usermod -a -G bumblebee $USER

Then, reboot your ubuntu.

To see if it works, run during around 30s:

glxspheres

Then, run it with optirun, and compare:

optirun glxspheres

Be aware that as Bumblebee is using low-level hardware informations, it is impossible to run it in a VM.

If you want to run 32-bit apps in Oneiric, install:

sudo apt-get install virtualgl-libs:i386 libgl1-mesa-glx:i386 libc6:i386

To report issues, please read http://wiki.Bumblebee-Project.org/Reporting-Issues

To install Bumblebee 3.0 on Arch Linux follow links below:

AUR package: http://aur.archlinux.org/packages.php?ID=49469
Instructions in the ArchWiki: https://wiki.archlinux.org/index.php/Bumblebee

Incoming search terms:

Related Posts:


Posted by gofly

댓글을 달아 주세요

  1. Favicon of https://belong2jesus.tistory.com BlogIcon gofly 2013.04.09 11:08 신고  댓글주소  수정/삭제  댓글쓰기

    혹시 ERROR CANNOT ACCESS SECONDARY GPU - ERROR XORG (EE) [DRM] COULD NOT SET DRM DEVICE BUS ID라고 나오면 " bumblebee-nvidia"를 설치해 보세요

    $ sudo apt-get install bumblebee-nvidia

    하시면 됩니다.




우분투 12.04 LTS(Long Term Support)가 드디어 출시 되었습니다!!!!!!

한글 문제도 해결 되었고, 여러가지로 변경된게 많은데......;;;;;;

아직 깔아 보진 못했네요^^ 깔고나서 다시 한 번 글을 올리던 해야 곘네요....ㅋㅋㅋㅋ^^ㅋㅋㅋㅋ


아무튼 신난다 리눅스 쓰는 거!!!! ㅋㅋㅋㅋㅋ

Posted by gofly

댓글을 달아 주세요


BitstreamVeraSansMono.ttf


어딘가에서 폰트 경연을 했는데 프로그래머들이 가장 선호한 폰트라죠??

저도 이거 쓰고 있는데 정말 좋습니다.

ㅋㅋㅋ 강추!!!!




Posted by gofly

댓글을 달아 주세요

Adobe Air
 
32bit 운영체계에서는 Terminal에서 아래와 같이하면 Adobe AIR 가설치됩니다.

wget 
http://airdownload.adobe.com/air/lin...RInstaller.bin 
chmod +x ./AdobeAIRInstaller.bin 
sudo ./AdobeAIRInstaller.bin 

만 약 64bit운영체계의 Ubuntu를 사용하고 있다면 아래와 같이 ia32-libs를 반드시 설치해줘야 합니다.

sudo apt-get install ia32-libs <-----중요
wget http://airdownload.adobe.com/air/lin...RInstaller.bin 
chmod +x ./AdobeAIRInstaller.bin 
sudo ./AdobeAIRInstaller.bin 

Access it through Applications → Accessories → Adobe Air Application Installer.






=================2012.04.22 추가========================
Ubuntu 12.04에서 Adoebe Air 설치시 주의 점!!!

12.04버전에는 Air를 설치할 때 Gnome Keyring 이나 KDE Wallet을 설치하라는 문구가 계속뜹니다.
문제는 Synap을 통해서 Gnome Keyring이나 KDE Wallet을 설치해도 Air 설치 도중에 계속 같은 문구가 뜬다는 점입니다.
해서 뒤지다 뒤지다 그 문구의 해결 책을 찾았네요^^ ㅋㅋㅋㅋ

링크파이을 만들어서 넣으면 되더군요......


32bit의 경우 


sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0

sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0


64bit의 경우


sudo ln -s /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0

sudo ln -s /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0

Posted by gofly

댓글을 달아 주세요

  1. 머니볼 2012.06.07 10:18  댓글주소  수정/삭제  댓글쓰기

    안되서 한참 헤맸는데.. 덕분에 잘 해결했습니다. 감사합니다

  2. 대박 2012.06.13 16:29  댓글주소  수정/삭제  댓글쓰기

    우와 님짱!!!

  3. 오오 2012.07.21 12:38  댓글주소  수정/삭제  댓글쓰기

    정말감사합니다 ㅎㅎ

  4. Favicon of http://twitter.com/gcd822 BlogIcon 한창엽 2013.08.30 17:46  댓글주소  수정/삭제  댓글쓰기

    오 잘되네요 감사하빈다^^

Right now Adobe AIR is only officially available for 32-bit Linux. But it does work on 64-bit Linux with the 32-bit compatibility libraries. There are several ways to install Adobe AIR on Linux. My preferred way on Ubuntu is to use the .deb package. However the .deb package distributed by Adobe can only be installed on 32-bit systems. Good news is that this can be easily fixed! To install the Adobe AIR .deb package on a 64-bit system just follow these steps:

  1. Download the Adobe AIR .deb file
  2. In a terminal window go to the directory containing the adobeair.deb file
  3. Create a tmp dir:
    mkdir tmp
  4. Extract the deb file to the tmp dir:
    dpkg-deb -x adobeair.deb tmp
  5. Extract the control files:
    dpkg-deb --control adobeair.deb tmp/DEBIAN
  6. Change the Architecture parameter from “i386″ to “all”:
    sed -i "s/i386/all/" tmp/DEBIAN/control
  7. Repackage the deb file:
    dpkg -b tmp adobeair_64.deb

Now you can install Adobe AIR on a 64-bit system! From the command line just do:

sudo dpkg -i adobeair_64.deb

That’s it! Let me know if you have any questions.


Posted by gofly

댓글을 달아 주세요

  1. Favicon of https://belong2jesus.tistory.com BlogIcon gofly 2012.04.23 00:04 신고  댓글주소  수정/삭제  댓글쓰기

    근데 이렇게하면 않되네요^^;;;;;
    설치는 되는데 AIR가 실행이 않됩니다....;;; 주의!!!!

    차라리 아래 링크로 가세요.....^^;;;;

    http://belong2jesus.tistory.com/38

KT Galaxy(갤럭시, 갤) S2 HD LTE 순정 펍웨어


순정 펌웨어 주소입니다.


클릭

Posted by gofly

댓글을 달아 주세요

jQuery HTML5 Fullscreen Slideshow

This jQuery plugin lets you create fullscreen galleries where the slides are shown on the entire screen using the fullscreen APIs provided by Firefox 10+ and Chrome 15+ (and possibly Safari 5.1+).

In all other browsers it falls back to displaying the slideshow in the entire viewport.

Example (click image to view)

Pictures take from Wikimedia Commons Picture of the Year 2007.

Usage


$(function(){
  // initialize the slideshow
  $('.image img').fullscreenslides();
  
  // All events are bound to this container element
  var $container = $('#fullscreenSlideshowContainer');
  
  $container
    //This is triggered once:
    .bind("init", function() { 

      // The slideshow does not provide its own UI, so add your own
      // check the fullscreenstyle.css for corresponding styles
      $container
        .append('<div class="ui" id="fs-close">&times;</div>')
        .append('<div class="ui" id="fs-loader">Loading...</div>')
        .append('<div class="ui" id="fs-prev">&lt;</div>')
        .append('<div class="ui" id="fs-next">&gt;</div>')
        .append('<div class="ui" id="fs-caption"><span></span></div>');
      
      // Bind to the ui elements and trigger slideshow events
      $('#fs-prev').click(function(){
        // You can trigger the transition to the previous slide
        $container.trigger("prevSlide");
      });
      $('#fs-next').click(function(){
        // You can trigger the transition to the next slide
        $container.trigger("nextSlide");
      });
      $('#fs-close').click(function(){
        // You can close the slide show like this:
        $container.trigger("close");
      });
      
    })
    // When a slide starts to load this is called
    .bind("startLoading", function() { 
      // show spinner
      $('#fs-loader').show();
    })
    // When a slide stops to load this is called:
    .bind("stopLoading", function() { 
      // hide spinner
      $('#fs-loader').hide();
    })
    // When a slide is shown this is called.
    // The "loading" events are triggered only once per slide.
    // The "start" and "end" events are called every time.
    // Notice the "slide" argument:
    .bind("startOfSlide", function(event, slide) { 
      // set and show caption
      $('#fs-caption span').text(slide.title);
      $('#fs-caption').show();
    })
    // before a slide is hidden this is called:
    .bind("endOfSlide", function(event, slide) { 
      $('#fs-caption').hide();
    });
});
    

License

© Copyright 2012 by Eike Send

The code is licensed under the MIT and the GPLv2 Licenses, just like jQuery.

출처:http://eikes.github.com/jquery.fullscreen.js/?utm_source=html5weekly&utm_medium=email 

Posted by gofly

댓글을 달아 주세요


Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
By Tim Hill

Chapter 2 from Windows NT Shell Scripting, published by MacMillan Technical Publishing

  • Command Shell Basics The command shell is introduced, along with the basic command syntax. The difference between CMD.EXE and COMMAND.COM is explained.

  • Starting a Command Shell Learn how to start, stop and nest command shells. Command line switches accepted by the command shell are also detailed.

  • Command Line Editing Find out about the various command text-editing features, including less well-known features such as command completion and the command history.

  • DOSKEY and Command Macros The features available through the DOSKEY command are described here, including command macros.

  • Launching Applications from the Shell This section provides complete details of how the shell launches applications, including how they are located and how file associations are used. The role of the PATH and PATHEXT variables is explored, as well as the use of the START command.

  • Controlling Script Output Various commands allow control over script output, such as ECHO and TITLE.

  • Command Redirection Find out how to capture command output, redirect command input, and send the output of one command to the input of another.

  • Running Multiple Commands Complex command lines execute multiple commands; learn about multi-line commands and the use of parentheses to group commands together.

  • Using Command Filters The filter commands, such as MORE and SORT, are described here.

  • The Windows NT Command Scheduler This section describes the Windows NT command scheduler, the Schedule Service and the AT command.

On This Page

Command Shell Basics 
Starting a Command Shell 
Command Line Editing 
DOSKEY and Command Macros 
Launching Applications from the Shell 
Controlling Script Output 
Command Redirection 
Running Multiple Commands 
Using Command Filters 
The Windows NT Command Scheduler 

Command Shell Basics

명령어 해독기의 기본


The previous chapter introduced the Windows NT console window. By far the most common use for a console window is to execute the Windows NT command shell. The command shell defines the Windows NT scripting language and is responsible for processing scripts, as well as commands typed at the keyboard.

장(chapter)에 앞서 Windows NT console창에 대해서 소개했습니다. console창에서 가장 필요로 하는 것은 Windows NT command shell을 실행하는 것입니다. 키보드에서 입력한 명령어를 명령 해독기(Command shell)는 Windows NT scripting 언어로 정의 하거나 processing scripts에 응답(또는 반응)합니다.


The command shell is a console application. As explained in chapter 1, console applications are Windows NT applications that interact via a console window, rather than via GUI elements such as windows and dialog boxes. When you start a command shell, Windows NT creates a console window for that shell. All commands that are run from within a shell (including other command shells) share the same console window for output. The only exception to this is the START command, which can be used to create additional console windows.

명령어 해독기는 console응용 프로그램입니다. 1장에서 설명했듯, console응용프로그램은 창(Windows)이나 Dialog박스와 같은 GUI요소를 활용하기보다, console창을 통해 유기적으로 작동하는 Windows NT 응용프로그램입니다.


To start a default command shell in a console window, click the Start button, select the Programs item, and then select the Command Prompt command. The section "Starting a Command Shell" details additional ways to start a command shell.

console window의 기본명령어 해독기를 시작하려면, 시작 버튼을 누르고, 프로그램에 명령프롬프트 명령(Command Prompt Command)을 선택합니다. "명령어 해독기의 시작"은 명령어 해독기 시작이라는 부가적인 방법을 열거한다.(뭔말인건지;;;;)


Command Shell Modes

By default, command shells run in Interactive mode. In this mode, the shell displays a prompt and then waits for keyboard input. When a command line is entered, it is immediately interpreted and then executed. After execution completes, the shell displays another prompt, and the whole sequence begins again. This continues until the EXIT command ends the command shell session. Figure 2.1 shows this basic command execution sequence.

If a command entered is the name of a script file, the command shell switches to Script mode, and begins reading, interpreting, and executing commands from the specified script file. Figure 2.2 shows the command execution sequence while the shell is in script mode. Execution of the script ends when the shell reaches the end of the script file. At this point, the shell returns to interactive mode, displays another command prompt, and waits for keyboard input.

Figure 2.1: Interactive mode shell execution sequence

Figure 2.1: Interactive mode shell execution sequence

The Command Shell Prompt

The command shell displays the shell prompt when it is ready to accept a command in interactive mode. The default shell prompt is the current drive and path name, followed by a > character. When the command shell is in script mode, prompts are only displayed if command echo is enabled. The ECHO command, described in the section "Controlling Script Output," controls command echo.

The PROMPT command changes the command shell prompt. Follow the PROMPT command with the text of the new shell prompt. For example:

1. C:\>prompt ???
2. ???

Figure 2.2: Script mode shell execution sequence

Figure 2.2: Script mode shell execution sequence

This example changes the command prompt to three question marks. Notice that the shell uses this prompt on line 2 in the example. To revert to the default prompt, enter a PROMPT command without any prompt text. For example:

1. ???prompt
2. C:\>

The prompt is restored to the default.

The command prompt text can contain special characters used as placeholders for additional information. For example, $T in the command text is replaced with the current time when the prompt is displayed, and $G is replaced with the > character. The following example shows this:

1. C:\>prompt $T$G
2. 14:23:50.35>

Using $G to represent the > character might seem unnecessary, as this character can simply be typed. However, this does not work, because the command shell reserves certain characters for special purposes. These reserved shell characters all have $c equivalents, so that they can be used in command prompts. For example, $A is used for an ampersand, $L for a < character, and so on. Table 2.1 shows the complete set of special characters recognized in a command shell prompt.

Table 2.1 Special Characters in a Shell Prompt

Character

Description

$A

Ampersand character.

$B

Pipe (|) character.

$C

Left parenthesis.

$D

Current date.

$E

Escape code (ASCII 27).

$F

Right parenthesis.

$G

Greater than character.

$H

Backspace character.

$L

Less than character.

$N

Current drive letter.

$P

Current drive letter and directory path.

$Q

Equal sign.

$S

Space.

$T

Current time.

$V

Windows NT version number.

$_

New line.

$$

Dollar sign.

$+

A series of "+" signs, corresponding to the number of pushed directories on the PUSHD stack. See the PUSHD command in Part III.

$M

The remote name (UNC name) for the current drive.

The $+ special character works in conjunction with the PUSHD and POPD commands (see Part III). These commands manage a push-down stack of directories and drives, and the $+ special character displays a sequence of + characters in the command prompt, one for each level in the push-down stack.

If the current drive is a network drive, the $M special character displays the remote UNC name of this drive in the form \\server\share. If the current drive is a local drive, then $M does not display anything.

The current prompt text is stored in the PROMPT environment variable. Changing the prompt changes the value of this variable and vice versa. Thus, these two commands have the same effect:

1. C:\>prompt [$p]
2. C:\>set PROMPT=[$p]

Simple Command Syntax

As described in chapter 1, simple shell commands consist of a command name followed by any required arguments. The command name and arguments (if any) are separated by a space. A command is always entered in response to a shell prompt. Figure 2.3 shows a simple shell command.

Figure 2.3: Simple command syntax

Figure 2.3: Simple command syntax

In Figure 2.3, the command name describes the action to be performed, while the arguments provide additional information needed to carry out this action. The syntax of the command arguments is specific to each command. However, there are a number of well-established conventions for command argument syntax. These are only conventions, however, and each individual command is free to interpret the supplied arguments however it chooses:

  • First, multiple arguments are normally separated from one another by spaces. In Figure 2.3, the command has three arguments, c:\*.bak, e:\backup, and /s. Occasionally, other characters are used as argument separators. For example, the COPY command can use + characters to separate multiple filenames.

  • Second, any argument that contains spaces or begins or ends with spaces must be enclosed in double quotes. This is particularly important when using long file and directory names, which frequently contain one or more spaces. If a double-quoted argument itself contains a double quote character, the double quote must be doubled. For example, enter "Quoted" Argument as """Quoted"" Argument".

  • Third, command switches always begin with a slash / character. A switch is an argument that modifies the operation of the command in some way. Occasionally, switches begin with a + or - character. Some switches are global, and affect the command regardless of their position in the argument list. Other switches are local, and affect specific arguments (such as the one immediately preceding the switch).

  • Fourth, all reserved shell characters not in double quotes must be escaped. These characters have special meaning to the Windows NT command shell. The reserved shell characters are:

    & | ( ) < > ^

    To pass reserved shell characters as part of an argument for a command, either the entire argument must be enclosed in double quotes, or the reserved character must be escaped. Prefix a reserved character with a carat (^) character to escape it. For example, the following command example will not work as expected, because < and > are reserved shell characters:

    1. C:\>echo <dir>
     2. The syntax of the command is incorrect.
    

    Instead, escape the two reserved characters, as follows:

    1. C:\>echo ^<dir^>
     2. <dir>
    

    Typically, the reserved shell characters are not used in commands, so collisions that require the use of escapes are rare. They do occur, however. For example, the popular PKZIP program supports a -& switch to enable disk spanning. To use this switch correctly under Windows NT, -^& must be typed.

    Tip The carat character is itself a reserved shell character. Thus, to type a carat character as part of a command argument, type two carats instead. Escaping is necessary only when the normal shell interpretation of reserved characters must be bypassed.

  • Finally, the maximum allowed length of a shell command appears to be undocumented by Microsoft. Simple testing shows that the Windows NT command shell allows very long commands—in excess of 4,000 characters. Practically speaking, there is no significant upper limit to the length of a command.

CMD.EXE and COMMAND.COM

Be aware that a command shell is not an MS-DOS command prompt, even though it shares the same icon. The Windows NT command shell is a full 32-bit Windows NT console application that resides in the CMD.EXE executable file. The MS-DOS command prompt is a 16-bit DOS application that resides in the COMMAND.COM executable file. Because COMMAND.COM is a 16-bit DOS executable, Windows NT executes this shell within a Windows NT virtual DOS machine (VDM). COMMAND.COM is supplied primarily for compatibility with MS-DOS.

Surprisingly, however, both the Windows NT and the MS-DOS shells have almost identical features. Here is a sample IF command entered into a Windows NT command shell, followed by the command output:

1. C:\>if /i a==A echo MATCH
2. MATCH

The IF command compares the letter "a" to the letter "A" and echoes MATCH if they compare. The /I switch compares the two letters without regard to letter case. Therefore, not surprisingly, the command echoes MATCH.

Here is the same IF command entered into an MS-DOS 16-bit COMMAND.COM shell (running on Windows NT on the same computer):

1. C:\>if /i a==A echo MATCH
2. MATCH

The output of both commands is identical. This is surprising, as the /I switch is a new feature of the Windows NT command shell (CMD.EXE) which is not understood by COMMAND.COM when running under actual MS-DOS.

This behavior reveals a quite subtle feature of Windows NT that is very important. The 16-bit MS-DOS shell (COMMAND.COM) that ships with Windows NT is specially designed for Windows NT. When a command is entered for execution by this shell, it does not actually execute it. Instead, it packages the command text and sends it to a 32-bit CMD.EXE command shell for execution. Because all commands are actually executed by CMD.EXE (the Windows NT command shell), the 16-bit shell inherits all the features and facilities of the full Windows NT shell.

You can see COMMAND.COM automatically execute a 32-bit CMD.EXE shell by using the Windows NT Task Manager application. Follow this procedure:

  1. Right-click in an empty area in the taskbar. From the popup window select the Task Manager command to start Task Manager.

  2. Click the Processes tab to display the list of running Windows NT processes.

  3. Click the Start button in the taskbar and select the Run command.

  4. In the Open box, type COMMAND. Then click OK to start a 16-bit command prompt.

  5. Now examine the list of processes in the Task Manager window. You should see at least one NTVDM process. This is the Windows NT VDM, which NT starts to allow COMMAND.COM to execute.

  6. In the COMMAND.COM window, enter any command which generates lengthy output (DIR /S is a good choice). When the output begins scrolling, press Ctrl+S to pause the command.

  7. Switch to Task Manager and examine the list of processes again. Notice that a new CMD.EXE (command shell) is running. Figure 2.4 shows a typical Task Manager window.

  8. Switch to the COMMAND.COM window and press Ctrl+S again. Wait for the command to complete.

  9. Switch to Task Manager again. Notice that the CMD.EXE shell has disappeared from the Processes list.

  10. To close the COMMAND.COM window enter an EXIT command.

This simple experiment shows that every command entered for execution, regardless of the shell used, is ultimately executed by CMD.EXE, the Windows NT command shell.

Cc723564.shell04(en-us,TechNet.10).gif

Figure 2.4: Task Manager showing automatic CMD.EXE execution

Starting a Command Shell

You can start a Windows NT command shell in a number of different ways:

  • Select the Programs item in the Start menu, and then select the Command Prompt command.

  • Select the Run command in the Start menu, enter CMD in the Open box and click OK.

  • Enter a CMD command in an existing command shell.

  • Enter a START command in an existing command shell, and specify CMD as the command to execute.

  • Double-click a .BAT or .CMD script file in an Explorer window.

All these methods except the last start a command shell in Interactive mode. The last method starts the command shell in Script mode.

Like most other commands, the command shell CMD.EXE accepts several switches that control various shell options. Table 2.2 shows these switches, which are described in detail in the "Command Reference" in Part III.

Table 2.2 CMD.EXE Switches

Switch

Description

/X

Enables command extensions (default).

/Y

Disables command extensions.

/A

Command output to files or pipes will be ANSI (default).

/U

Command output to files or pipes will be Unicode.

/T

Sets foreground and background window colors.

/C

Executes command specified and then terminate shell.

/K

Executes command specified and then prompts for additional commands.

To specify shell switches, place them after the CMD command on the command line. It is not possible to directly enter shell switches if the shell is started from the Start menu Command Prompt command, or by double-clicking a .BAT or .CMD script file (the first and last methods in the preceding list).

Without any switches, a command shell starts in Interactive mode with command extensions enabled. Command extensions are certain features added to the command shell since Windows NT was first released. In general, these extensions are backward compatible, but they can occasionally cause older Windows NT and MS-DOS scripts to fail. In this case, the /Y switch disables the extensions and, in effect, runs an MS-DOS compatible command shell.

The /C and /K switches directly execute a command. The command to execute is specified following the switch. For example:

1. C:\>cmd /c echo Run this...
2. Run this...

All command line arguments following the /C or /K switch describe the command to execute. The /C switch executes the specified command, and the command shell then terminates. The /K switch executes the specified command, and the shell then enters Interactive mode. The /K switch is particularly useful to set up a command shell to a predetermined state before the first command prompt is displayed.

The /C and /K switches both accept any valid shell command, including the name of a script file to execute. In this case, the shell enters script mode and executes the specified script. This is the method the Windows NT Explorer uses to start a script file when it is opened. For example, if you double-click on the file SCRIPT.BAT, Explorer actually executes this command:

cmd /c script.bat

Terminating a Command Shell

In Interactive mode, the EXIT command terminates a command shell. If a console window was created for the command shell, the console window closes. If the command shell was invoked from within another program (including another command shell), that program regains control of the console window.

Tip Closing the console window also terminates a command shell. This method is valid only for the 32-bit CMD.EXE shell. The 16-bit COMMAND.COM shell should not be terminated in this manner.

The EXIT command can also be used in script mode. The command should be used with care, however, as the shell terminates immediately, effectively aborting script execution. Scripts should normally end by executing to the end of the script file, or by the GOTO :EOF command (see Chapter 4).

If a script file is running in a shell that was started using the /C switch, the command shell terminates when the script reaches the end of the file.

Nesting Command Shells

A command shell can be started from within another command shell, commonly referred to as nesting a shell. This can be done either with the START command or by entering a CMD command directly at the command prompt. Nesting shells is useful if a command or script must be executed using different options to the current shell. For example, command extensions can be disabled in the nested command shell, or the command redirection mode changed. For example:

1. c:\>prompt [$p]
2. 
3. [c:\]cmd /y
4. Microsoft(R) Windows NT(TM)
5. (C) Copyright 1985-1996 Microsoft Corp.
6. 
7. [c:\]prompt
8. c:\>exit
9. [c:\]

The first PROMPT command changes the prompt. A new command shell is then invoked with the /Y switch (to disable command extensions). Notice that the new command shell inherits the prompt from the previous shell. The second PROMPT command returns the prompt to the default, as can be seen in the subsequent shell prompt (C:\>). The EXIT command exits the nested command shell, reverting to the previous (original) shell. Notice that the prompt reverts to the modified form, showing that the second command shell has indeed terminated.

The inheritance of the current command prompt by nested command shells is not a special feature of the shell. It occurs because the current command prompt is stored in an environment variable, and all commands executed from a shell inherit the current shell environment. The environment and inheritance is described fully in Chapter 3.

Nested command shells are useful when used with the /C switch. Suppose the script SXT.BAT was designed to run correctly only if command extensions are enabled. The following command executes this script correctly regardless of the state of command extensions for the current shell:

C:\>cmd /x /c sxt.bat

Another use of nested command shells—capturing all script output—is described in the upcoming section, "Controlling Script Output."

Command Line Editing

When in interactive mode, the command shell provides a rich set of tools to assist in command entry and editing. Most of these tools are applicable to all console applications that use line by line input. The command-line editing tools include:

  • Basic character editing, such as Backspace and Delete.

  • Template editing, which operates with a copy of the previously entered command.

  • Command history editing, which allows quick recall of previously entered commands.

  • Command completion, which automatically completes partially entered file and directory names.

  • Command macros, which are described in "DOSKEY and Command Macros."

The "Command Line Editing" section in the "Command Reference" describes the full set of command-line editing commands.

Basic Character Editing

Basic character editing includes familiar commands such as Backspace, which erases the character to the left of the cursor, and Delete, which erases the character to the right of the cursor. Use the Left Arrow or Right Arrow keys to move the cursor left or right one character. Use these keys with Ctrl to move the cursor left or right one word. Use Home to move the cursor to the start of the command line, and End to move to the end of the command. Press the Esc key to delete the entire command, and press Enter to execute the command. The cursor does not have to be at the end of the line when Enter is pressed.

By default, the character editor operates in Overwrite mode. New characters typed overwrite characters at the current cursor location. Pressing the Insert key switches to Insert mode. In Insert mode, characters to the right of the cursor are shifted to the right as new characters are entered at the cursor location. Repeatedly pressing Insert toggles back and forth between the two modes. The cursor changes shape to indicate the mode—Insert mode is indicated by a larger, block shaped cursor. The mode resets when the Enter key is pressed.

The default Insert/Overwrite mode can be changed from Overwrite to Insert either by the DOSKEY command or via the Console Window property sheet's Options tab, as described in Chapter 1.

Template Editing

The second editing method, template editing, works in conjunction with a hidden command buffer, the template, which contains a copy of the most recently entered command. Template editing is present for compatibility with MS-DOS, and the newer command history editing commands generally make template editing obsolete.

The template F4 command is useful to quickly delete blocks of characters in a command line. Position the cursor at the first character to delete and press F4. A popup prompt appears. Enter a single character, and all characters in the command line from the cursor up to (but not including) the first instance of the specified character are deleted.

Command History Editing

Command history editing provides quick access to a list of recently executed commands, also known as the history buffer. Commands in this buffer can be re-executed, or recalled to the command line and edited as desired.

Each time a shell command executes, the command text is added to the command history buffer, and is then available for later recall. The maximum number of stored commands is set by the DOSKEY command or via the Console Window property sheet's Options tab, as described in Chapter 1.

The F7 key displays the command history buffer. Press F7, and a popup window appears containing the contents of the history buffer, with the oldest commands listed first.

Figure 2.5 shows a console window with a command history popup displayed. Each command is numbered, starting with 1 for the oldest command. The Up Arrow and Down Arrow keys move up and down through the list of commands, while the Page Up or Page Down keys move to the start or end of the command list. The Esc key closes the history buffer popup window without executing a command.

Cc723564.shell05(en-us,TechNet.10).gif

Figure 2.5: The command history buffer popup window

To recall a command from the history buffer and execute it:

  1. Press F7 to display the command history popup window.

  2. Use the up arrow and down arrow keys in the popup window to highlight the command to execute.

  3. Press Enter to execute the command.

When editing a command, use the up and down arrow keys to directly recall commands from the history buffer for editing. This differs from using these keys within the command history popup window. Press the keys repeatedly to cycle through all commands in the command buffer. The Up Arrow key moves back through the command history (starting with the most recently entered command) while the Down Arrow moves forward through the command history. The Page Up key moves to the oldest command in the history buffer, and the Page Down key moves to the newest command in the buffer. Once a command is recalled to the command line, it can be edited as needed and then executed by pressing the Enter key.

The F8 key searches the history buffer. Begin by typing the first few characters of the command that is required into the command line. Press the F8 key, and the first (most recent) command in the history buffer that begins with the characters entered is recalled to the command line. Repeatedly pressing F8 continues to search for additional matching commands in the history buffer.

The F9 key recalls commands from the history buffer by number. Command numbers are displayed in the command history popup, accessible by pressing F7. Press F9, and a popup window appears asking for the command number. Enter the command number, and the specified command is recalled to the command line ready for editing or execution. The F9 key can also be used while the command history buffer popup window is displayed.

Windows NT supports command history editing for any program which reads keyboard input on a line-by-line basis. Each program maintains its own command history, so multiple command shells each have an independent command history buffer.

Command Completion Editing

Command completion automatically completes the typing of long file or directory names. Before this feature can be used, it must be enabled by changing a setting in the Windows NT registry. The value to alter is:

HKEY_CURRENT_USER \Software \Microsoft \Command Processor\CompletionChar

The default value for this is 0x0, which disables command completion. To enable command completion, set this value to the ASCII code for the key to use as the command completion key. The Tab key, value 0x9, is a good choice since it is not normally used in commands. The value is located in the per-user portion of the registry, and is therefore enabled on a per-user basis.

Once enabled, command completion operates as follows:

  1. When entering a file or directory name, type the first few characters of the name and press the chosen command completion key (e.g. the Tab key).

  2. The shell searches the current directory for a file or directory name which begins with the specified characters, and replaces the typed characters with the complete file or directory name.

  3. Pressing the command completion key again cycles through all additional matching file names.

For example, suppose the current directory (C:\BOOK) contains three files, CHAP01.DOC, CHAP02.DOC and CHAPTER.DOC. Type the following, but do not press Enter:

C:\book>type chap

Press the command completion key. The command line immediately changes to:

C:\book>type "c:\book\chap01.doc"

The partial file name is replaced with the first file name found in the directory. The full path name is substituted, and the whole argument is placed in double quotes. This ensures that a valid argument is created even if the file name contains spaces. Press the command completion key again, and the command line changes to:

C:\book>type "c:\book\chap02.doc"

The command completion character can also be used when no characters of a file or directory name are entered. Type the command up to the file or directory name, making sure that the last character entered is a space. Then press the command completion key. In this case, all file and directory names in the current directory are presented in sequence.

Command completion is a very useful editing tool, particularly when long file and directory names are in use.

DOSKEY and Command Macros

The DOSKEY command provides command line control of various advanced shell command editing features. In MS-DOS, the DOSKEY command was a Terminate-and-Stay Resident (TSR) that needed to be loaded before its features were available for use. In Windows NT, these features are built into the shell and are always available; DOSKEY merely provides an interface to control them.

The DOSKEY command actually provides three distinct functions:

  • Insert mode control

  • command history buffer management

  • command macro management

Insert mode control sets the initial Insert/Overwrite edit toggle. For example, this command sets the initial toggle to Insert mode:

C:\>doskey /insert

This command sets the initial toggle to overwrite mode:

C:\>doskey /overstrike

The initial state of this toggle is set for a console window using the console window property sheet Options tab, as described in Chapter 1.

The following DOSKEY command clears the command history buffer (described in the previous section "Command History Editing") of all commands:

C:\>doskey /reinstall

This command optionally sets a new size for the command history buffer. For example:

C:\>doskey /reinstall /listsize=100

This example clears the command history buffer and sets the number of commands in the buffer to 100. The command history buffer size can also be set for a console window using the Console Window property sheet Options tab, as described in Chapter 1.

The final set of DOSKEY commands provides control of command shell macros. Command macros are shorthand commands for longer, more complex shell commands. Macros can reduce typing or, in scripts, provide simple one-line functions. For example, to define a new macro named LS, which executes a DIR command, enter:

C:\>doskey ls=dir

The command shell will now accept LS as an alias for the DIR command. For example:

1. C:\>ls
2.  Volume in drive C is BOOTFAT
3.  Volume Serial Number is 3F3F-1704
4. 
5.  Directory of C:\
6. 
7. 05/31/94  01:22p  54,645 COMMAND.DOS
8. ...etc.

Command macros, like all shell commands, are not case sensitive. The simple definition of LS is not a direct replacement for the DIR command, however, because it does not accept arguments. For example:

C:\>ls *.dos

will not work as expected. The *.DOS argument is ignored, and the entire directory is displayed. To pass arguments to a macro, define the macro as follows:

C:\>doskey ls=dir $*

The special $* argument acts as a placeholder for all arguments entered on the command line. The LS macro is now an exact replacement for the DIR command. The DOSKEY section in the "Command Reference" in Part III lists additional special arguments that can be used within macro definitions.

Obviously, directly replacing one command by an alias is of limited use. However, macros can replace more complex commands. For example:

C:\>doskey ls=dir /od $*

This definition of the LS macro always provides directory listings sorted in date order. The /OD switch tells the DIR command to sort files according to date and time.

The following macro definition creates a command that displays the user name of the currently logged-on user:

1. C:\>doskey myname=for /f "delims=\ tokens=2" %i in ('whoami') do @echo %i
2. C:\>myname
3. TimHill

The MYNAME macro uses an advanced FOR command (described in Chapter 4, "Control Flow, Procedures, and Script Nesting") and the WHOAMI command to extract the user name. Typing MYNAME is far simpler than entering the complex FOR command. Macros are also very useful when combined with the various compound command symbols described in the section "Running Multiple Commands." For example:

C:\>doskey dircount=dir $* $B find "<DIR>" /c

This example creates a DIRCOUNT macro that counts the number of directories in a specified directory. The $B argument acts as a placeholder for the pipe symbol (|). Alternatively, the pipe symbol can be entered directly by escaping it using a ^ character. Pipes are described in the section "Command Redirection."

Macros can be used with any Windows NT application which accepts line-by-line command input. However, each macro is explicitly defined for a specific application. By default, macros are defined for use by the command shell, CMD.EXE. The /EXENAME switch defines a macro for another application. For example, to define an EXIT macro for use with FTP, enter:

C:\>doskey /exename=ftp.exe exit=bye

The /MACROS switch lists defined macros for the command shell, for example:

1. C:\>doskey /macros
2. ls=dir $*

The /EXENAME switch lists macros for a specific application, for example:

1. C:\>doskey /macros /exename=ftp.exe
2. exit=bye

The /MACROS:ALL switch lists macros for all applications. The macros for each application are listed under the application name, which is placed in brackets.

The /MACROFILE switches reads a set of macro definitions from a file, for example:

C:\>doskey /macrofile=macros.mac

The format of macros in the macro file exactly matches the output of the DOSKEY command with the /MACROS:ALL switch. Therefore, it is possible to define a set of macros interactively and then use DOSKEY to create a macro file. Later, the macros can be recalled. For example:

1. C:\>doskey ls=dir /od $*
2. C:\>doskey /exename=ftp.exe exit=bye
3. ...etc.
4. C:\>doskey /macros:all >macros.mac

This example uses command output redirection (described in the section "Command Redirection") to capture the macro definitions to the file MACROS.MAC. Later, the /MACROFILE switch can reload the macros. One convenient way to do this is to use the CMD.EXE /K switch. For example:

C:\>cmd /k doskey /macrofile=macros.mac

This starts a new shell and pre-loads all the macros in MACROS.MAC. If this command is placed in a shortcut, a new command shell can be started and a set of macros loaded automatically without any typing.

Launching Applications from the Shell

As described at the beginning of this chapter, a basic shell command is composed of a command name followed by zero or more arguments. The command name specifies the action to be performed, and the arguments provide additional data used by the command to perform this action. In order to carry out the action specified by the command, the command shell must decode the command. This section describes the steps taken by the shell to decode each command.

Internal and External Commands

Commands can be broken into two main categories: internal and external. An internal command is one that is built-in to the shell itself. An external command is one that is contained within an executable file on the disk. For example, the COPY command is internal, while the XCOPY command is external (it is contained within the XCOPY.EXE file). Generally, the distinction between internal and external commands is unimportant, except that internal commands have no associated executable file.

The following are all of the Windows NT internal commands:

ASSOC

CALL

CHDIR/CD

CLS

COLOR

COPY

DATE

DIR

DPATH

ECHO

ENDLOCAL

ERASE/DEL

EXIT

FOR

FTYPE

GOTO

IF

MKDIR/MD

MOVE

PATH

PAUSE

POPD

PROMPT

PUSHD

REM

RENAME/REN

RMDIR/RD

SET

SETLOCAL

SHIFT

START

TIME

TITLE

TYPE

VER

 

The PATH Command and PATHEXT Variable

Two environment variables are intimately associated with shell command execution: PATH and PATHEXT.

The PATH environment variable defines the Windows NT search path. The search path is a list of directories that are searched when the command shell attempts to locate an executable file. Separate directories in the path list with semi-colons. For example, a typical path might contain:

d:\winnt40\system32;d:\winnt40;d:\ntreskit;c:\bin;c:\dos

The PATH command manipulates the PATH environment variable, although the variable can also be directly manipulated via the SET command (see Chapter 3 for a description of the SET command). To set a new system path, follow the PATH command with a new path list. For example:

C:\>path c:\bin;c:\scripts;d:\winnt

This PATH command tells Windows NT to search the C:\BIN, C:\SCRIPTS, and D:\WINNT directories for executable files.

Enter a PATH command without any arguments to display the current search path. For example:

1. C:\>path
2. PATH= d:\winnt40\system32;d:\winnt40;d:\ntreskit;c:\bin;c:\dos

One common use of the PATH command is adding a new directory to the search path. To do this, specify the existing search path as part of the new path. For example, to add a new directory, C:\NEWDIR, to the start of the path, use this command:

C:\>path c:\newdir;%PATH%

Use this command to add the same directory to the end of the path:

C:\>path %PATH%;c:\newdir

The PATH variable is initialized from the following sources of information:

  • The System Environment, which is set via the Control Panel System icon.

  • The User Environment, which is set via the Control Panel System icon.

  • Any PATH statements in AUTOEXEC.BAT (if parsing is enabled).

At logon time, path information from the sources listed above is concatenated together to form the initial path. After logging on, the PATH command is used to alter the path.

The PATHEXT environment variable defines the list of file extensions checked by Windows NT when searching for an executable file. Like the PATH variable, semi-colons separate individual items in the PATHEXT variable. The default value of PATHEXT is .COM;.EXE;.BAT;.CMD. The PATHEXT variable is manipulated via the SET command. For example, to add the .PL extension, use the following command:

C:\>set PATHEXT=%PATHEXT%;.pl

The following section describes how Windows NT and the command shell use the PATH and PATHEXT variables.

Command Search Sequence

When a command is submitted for execution (either by typing or as part of a script), the shell performs the following actions:

  1. All parameter and environment variable references are resolved (see chapter 3).

  2. Compound commands are split into individual commands and each is then individually processed according to the following steps (see the section "Running Multiple Commands" for details of compound commands). Continuation lines are also processed at this step.

  3. The command is split into the command name and any arguments.

  4. If the command name does not specify a path, the shell attempts to match the command name against the list of internal shell commands. If a match is found, the internal command executes. Otherwise, the shell continues to step 5.

  5. If the command name specifies a path, the shell searches the specified path for an executable file matching the command name. If a match is found, the external command (the executable file) executes. If no match is found, the shell reports an error and command processing completes.

  6. If the command name does not specify a path, the shell searches the current directory for an executable file matching the command name. If a match is found, the external command (the executable file) executes. If no match is found, the shell continues to step 7.

  7. The shell now searches each directory specified by the PATH environment variable, in the order listed, for an executable file matching the command name. If a match is found, the external command (the executable file) executes. If no match is found, the shell reports an error and command processing completes.

In outline, if the command name does not contain a path, the command shell first checks to see if the command is an internal command, then checks the current directory for a matching executable file, and then checks each directory in the search path. If the command name does contain a path, the shell only checks the specified directory for a matching executable file.

If the command name includes a file extension, the shell searches each directory for the exact file name specified by the command name. If the command name does not include a file extension, the shell adds the extensions listed in the PATHEXT environment variable, one by one, and searches the directory for that file name. Note that the shell tries all possible file extensions in a specific directory before moving on to search the next directory (if there is one).

For example, the following command explicitly specifies the path, command name, and file extension:

C:\>c:\bin\edit.exe

This command executes the program EDIT.EXE found in the directory C:\BIN. If the program is not found, the shell reports an error.

This example omits the path to EDIT.EXE:

C:\>edit.exe

To execute this command, the shell searches the current directory and then each directory in the search path until EDIT.EXE is found, or reports an error if the file is not found.

This example omits the path and file extension:

C:\>edit

To execute this command, the shell searches the current directory and then each directory in the search path. Assuming that the PATHEXT variable contains .COM;.EXE;.BAT;.CMD, each directory is searched for EDIT.COM, EDIT.EXE, EDIT.BAT and EDIT.CMD before the shell moves on to the next search directory.

Once the command shell resolves the command name either to an internal command or an external executable file, it executes the command as follows:

  • If the command is internal, the shell executes it directly.

  • If the command is a 16-bit or 32-bit Windows GUI executable program, the shell runs the program but does not wait for the command to complete.

  • If the command is a 32-bit console application, or a 16-bit MS-DOS application, the shell runs the command in the current console window and waits for the command to complete.

  • If the command is a script file (.BAT or .CMD), the shell switches to script mode and begins executing the script.

  • If the command is a document or data file name associated with an application, the shell executes the appropriate application. The shell applies the previous rules based upon the type of the application associated with the data or document file. See the following section for more information on file associations.

Notice that the command shell does not wait for GUI applications to complete execution before it continues. This behavior can be modified using the START command, described in the following section.

File Associations

Windows NT provides a database, in the system registry, which allows files to be associated with a particular application. The primary use of this association is called automatic application launching. This feature is used extensively in the GUI environment: whenever a data file or document is double-clicked, the associated application automatically launches, and the specified file or document then opens within that application.

Tip File associations can also be edited using Windows NT Explorer (using the View, Options command). However, the commands presented here have a finer degree of control than that provided by Explorer. For example, Explorer provides no easy way to delete an individual association.

File associations are also applicable to the command shell environment. For example, suppose Microsoft Word is installed on a computer. During installation of Word, .DOC files are associated with the Word application. Once this is done, it is possible to launch Word and open a .DOC file from a shell command simply by typing its name. For example:

C:\>c:\docs\letter.doc

This command launches Word and opens the file C:\DOCS\LETTER.DOC. If the file is in the current directory, the path is not required. For example:

C:\docs>letter.doc

In fact, the command shell applies the same rules when opening a document or data file as it does when searching for any external command. Thus, in the previous example, the shell looks for LETTER.DOC in the current directory and in all directories specified by the search path. If the C:\DOCS directory is added to the search path, the file LETTER.DOC can be opened in Word from any directory, merely by typing its name. For example:

1. C:\docs>path c:\docs;%PATH%
2. C:\docs>cd ..
3. C:\>letter.doc

As previously noted, the file association database is maintained in the Windows NT Registry. Therefore, changes made to file associations are persistent—they are retained even after the computer is reset. In addition, the database is maintained in the HKEY_LOCAL_COMPUTER portion of the registry. Thus, changes made to the file association database effect all users of a particular computer.

The file association database works with three items of information:

  • file extensions

  • file types

  • launch commands

A file extension is the familiar file name suffix after the last period in the file name. For example, MYSCRIPT.BAT has a file extension of .BAT. Most file extensions are one, two, or three characters long. A file type is a name for a particular class of file. For example, Windows NT scripts might be assigned a file type of Windows.Script. A launch command is a prototype command used to launch the associated application. For example, NOTEPAD.EXE %1 is a typical launch command.

When a document or data filename is specified as a command name, the shell uses the file association database to launch the correct application. It does this as follows:

  1. The shell extracts the file extension from the specified document file. It then searches the database for a matching file association. If no match is found, the shell reports an error and command processing completes.

  2. The shell then obtains from the database the name of the file type associated with the file extension.

  3. The shell then searches the database again for the specified file type. If no match is found, the shell reports an error and command processing completes.

  4. The shell obtains from the database the launch command associated with the file type.

  5. The shell now parses the launch command, replacing any parameters with arguments specified in the original shell command.

  6. Finally, the shell executes the parsed command. Typically, this launches the associated application.

This procedure is best understood through an example. Consider this command:

C:\docs>letter.doc

The shell first extracts the file extension, .DOC, and searches the database for the file type associated with this file extension. Typically, this yields a file type such as Word.Document.8. The shell now uses this file type to search for the launch command. Assume this is WINWORD.EXE %1. The %1 in this command is a formal parameter, which the shell replaces with the document file name (LETTER.DOC). So the final launch command is WINWORD.EXE LETTER.DOC. When this command executes, Word runs, and the LETTER.DOC file is opened.

File types are thus an intermediary between a file extension and a launch command. They exist to allow multiple file extensions to be associated with the same launch command. For example, a paint program might need to associate .BMP, .JPG, .TIF and .TGA files with a launch command. Rather than entering the same launch command in the database four times, the program uses a single file type and launch command, and then associates the file extensions with this type. Any subsequent changes made to the launch command are then automatically applied to all associated file extensions.

The ASSOC, FTYPE and ASSOCIATE commands are used to manipulate the file association database. The ASSOC command connects a file extension with a file type, and the FTYPE command connects a file type with a launch command.

Use the FTYPE command to create or edit a file type and associate it with a launch command. For example:

C:\>ftype REXX.File=c:\rexx\rexx.exe "%1"

This creates the file type REXX.File and associates the prototype command C:\REXX\REXX.EXE "%1" with the type. Notice the use of double quotes around the %1 parameter. This ensures that the command is handled correctly even if the specified document name contains spaces.

Tip When defining a prototype command, it is advisable to include the full path name of the executable file, unless the directory containing the executable will always be part of the search path.

The FTYPE command can also display the current launch command for a file type. For example:

1. C:\>ftype REXX.File
2. REXX.File=REXX "%1"

Finally, the command and file type can be deleted. For example:

1. c:\>ftype REXX.File=
2. c:\>ftype REXX.File
3. File type 'REXX.File' not found or no open command associated with it.

Once a file type and launch command are set up, the ASSOC command associates file extensions with that file type. For example:

1. C:\>assoc .rex=REXX.File
2. .rex=REXX.File

The current association of a file type is displayed using ASSOC. For example:

1. C:\>assoc .rex
2. .rex=REXX.File

Finally, the file extension association can be deleted. For example:

C:\>assoc .rex=

Notice that for both FTYPE and ASSOC, specifying the file type or file extension only displays the current association. Specifying the file type or file extension with a trailing = character deletes the current association.

The ASSOCIATE [RK] command provides a shorthand method to perform an ASSOC and FTYPE in one step. While not as versatile as the ASSOC/FTYPE combination, it is easier to use. ASSOCIATE directly associates a file extension with an application, providing the necessary file type and launch command automatically. For example:

C:\>associate .rex c:\rexx\rexx.exe

This command directly associates .REX files with the REXX.EXE application. The association can be deleted using the following command:

C:\>associate .rex /d

More information on the ASSOC, FTYPE and ASSOCIATE commands can be found in the "Command Reference."

Integrating New Script Languages with the Shell

By using a combination of the PATH and PATHEXT variables, along with the application association database, complete integration of new command types into the command shell is possible.

For example, suppose a REXX interpreter, REXX.EXE, is installed in the C:\REXX directory. REXX scripts can then be executed using commands such as:

C:\>c:\rexx\rexx myrexx.rex arg1 arg2 arg3

This executes the REXX interpreter, REXX.EXE, which then interprets and runs the script MYREXX.REX. In this example, ARG1 etc. are arguments passed to the script.

By adding an association to the file association database, the invocation of the REXX interpreter can be made implicit. For example:

1. C:\>ftype REXX.File=c:\rexx\rexx.exe "%1" %*
2. C:\>assoc .rex=REXX.File

These commands create the needed associations, so that a .REX file launches the REXX.EXE interpreter. Notice that by including the full path name in the prototype command the interpreter executes without adding the C:\REXX directory to the search path. In addition, the %1 parameter is placed in double quotes so that .REX filenames containing spaces are correctly handled. Finally, the special %* parameter represents all additional arguments following the first (in this case ARG1 ARG2 ARG3). Now, the original script command can be simplified to:

C:\>myrexx.rex arg1 arg2 arg3

By adding the file extension .REX to the list of file extensions specified with PATHEXT, the .REX file extension can also be made implicit. For example:

1. C:\>set PATHEXT=%PATHEXT%;.REX
2. C:\>myrexx arg1 arg2 arg3

At this point, entering a REXX script command to execute is as convenient as entering any native shell command.

Finally, the MYREXX.REX script can be stored in a central directory, and that directory added to the system search path. For example:

1. C:\>mkdir c:\rexxscripts
2. C:\>move myrexx.rex c:\rexxscripts
3. C:\>set PATH=%PATH%;c:\rexxscripts
4. C:\>myrexx arg1 arg2 arg3

At this point, the MYREXX.REX script can be executed in any directory, just by typing its name.

Tip File association database changes are persistent. However, changes to environment variables are not. Therefore, the changes to the PATH and PATHEXT variables shown in the prior examples are lost when the system is shutdown, or the current shell terminated. To make these changes persistent, edit the PATH and PATHEXT variables in the Environment tab of the Control Panel System applet.

The START Command

Previous sections described how the command shell implicitly interprets and executes a basic command. The START command explicitly executes a shell command, and provides additional control over how the command is handled by Windows NT.

The syntax of the START command is:

START ["title"] [switches] command-name [args]

The first item following the START command is an optional window title, enclosed in double quotes. By default, the START command executes the specified command in a new window. In this case, the title text is used as the window title.

Following the title are zero or more switches that control the operation of the START command. A command-name must then be present, which specifies the command to run. Following the command name are zero or more command arguments, which are passed to the specified command.

Tip All START switches and options must appear before the command-name. Switches and options placed after the command-name are passed, unaltered, to the command being started.

Without any of the optional switches, the START command executes the specified command. It does this as follows:

  • If the command is a 16-bit or 32-bit Windows GUI executable program, the START command runs the program but does not wait for the command to complete.

  • If the command is a 32-bit console application, or a 16-bit MS-DOS application, the START command runs the command in a new console window but does not wait for the command to complete.

  • If the command is a script file (.BAT or .CMD), or an internal command, the START command executes a new command shell (CMD.EXE) in a new console window. The script or internal command is executed using the /K switch. The START command does not wait for the command or script to complete.

  • If the command is a document or data file name associated with an application, the START command executes the appropriate application. The START command applies the previous rules based upon the type of the application associated with the data or document file.

Notice that the operation of the START command differs from the default command shell sequence:

  • First, the START command never waits for the command to complete.

  • Second, all console commands start in a new console window, rather than the current console window.

  • Finally, if the command is a script file or internal shell command, the START command executes the command using a new command shell (CMD.EXE) with the /K switch. This means that, after the script of internal command completes, the new command shell does not terminate, but instead enters interactive mode. For example:

C:\>start "New Window" dir

This command executes a DIR command in a new console window, giving the new window the title New Window. Since DIR is an internal command, the new command shell enters Interactive mode and prompts for additional commands after the DIR command completes.

To over-ride this behavior, explicitly execute a new command shell and use the /C switch. For example:

C:\>start "New Window" cmd /c dir

In this example, the command-name for the START command is actually CMD. The /C switch and DIR command are arguments to the CMD.EXE command shell. The START command therefore executes the command CMD /C DIR in a new console window. When the DIR command completes, the new command shell terminates, and the new console window closes.

The START command is most useful when one or more of the optional switches are used. All START switches follow the window title (if used) and precede the command name.

The /D switch specifies a new current drive and directory for the command. Without /D, the command inherits the drive and directory of the command shell. Follow the /D switch with the new drive and directory. For example:

C:\>start /dc:\book dir

The /I switch controls environment inheritance. Normally, all commands executed by the command shell inherit a copy of the current environment (this is described in detail in Chapter 3). The /I switch causes the command to inherit the environment as it existed when the command shell was first started. Thus, any changes made to the environment within the current command shell are not passed to the executed command.

The /MIN and /MAX switches specify the initial state of the new window created by the START command. These switches apply to all applications and commands, including 16 and 32-bit GUI applications. Without /MIN or /MAX, the START command creates the new window using Windows NT default settings. The /MIN switch creates the new window minimized, that is, as a task bar button. The /MAX switch creates the new window maximized, that is, occupying the entire screen.

The /LOW, /NORMAL, /HIGH and /REALTIME switches set the priority class for the command or application. By default, the START command executes all commands or applications at normal priority. The /LOW switch executes the application at low priority, while the /HIGH switch executes the application at high priority. The /REALTIME switch executes the application at real-time priority.

Troubleshooting Tip Use of the /REALTIME switch is strongly discouraged, as its use can compromise Windows NT stability.

Using /LOW to execute an application at low priority is a very useful way of running a low priority background task. For example:

C:\>start "Cleanup" /low /min cmd /c cleanup.bat

This command executes the CLEANUP.BAT script at low priority. The /MIN switch is used so that the script appears only as a button on the task bar.

As described above, the START command does not wait for the new command to complete; a new command prompt appears immediately and new commands can be executed at once. When used in a script, the next line in the script executes immediately. The /WAIT switch makes the START command wait for the command to complete before continuing. This switch applies to all commands and applications, including GUI applications.

Finally, the /B switch executes the command without creating a new console window. This switch is application only to internal commands and external console applications—it is ignored if the command specifies a GUI application. Using /B also implies the /WAIT switch.

Controlling Script Output

The command shell provides the following simple commands to control script output:

  • The REM command, which is used for script comments.

  • The CLS command, which clears the console window.

  • The COLOR command, which controls colors used in the console window.

  • The TITLE command, which changes the console window title bar text.

  • The @ command, which controls command echo on a line-by-line basis.

  • The ECHO command, which controls command echo and also displays text.

  • The NOW [RK] command, which displays time-stamped text.

REM

The REM (remark) command is the simplest script command because it does nothing. Any text can follow the REM command. REM commands are used for shell comments, and should be used liberally within a script (for example, to clarify complex script commands and document the script logic). The REM command also suppresses the meaning of reserved shell characters within the remark text. For example, the following is a valid remark:

C:\>rem This is valid in a REM statement: &, &&, ||, ^

Normally, the shell assigns special meanings to &, && etc., but in a remark command these characters are treated as regular text.

Troubleshooting Tip Because the REM command suppresses the normal interpretation of special shell characters, REM commands cannot appear within a multi-line command. For example, the following is invalid:

1. if "%X%"=="ABC" (
2.     rem An illegal comment!
3.     goto :EXIT
4. )

The shell combines multi-line commands (like the one above) into a single line before executing them. Therefore, the shell "sees" the command like this:

if "%X%"=="ABC" ( rem An illegal comment! &  goto :EXIT )

The REM command will include all the text on the line, up to and including the closing parenthesis. The GOTO command is not seen as a command at all, but instead as additional comment text.

CLS

The CLS command clears the current console window and positions the cursor to the top left of the window. Subsequent command output begins at the top of the window and works down the screen. The screen is cleared using the current window colors. The CLS command is useful when a script needs to present un-cluttered output.

COLOR

The COLOR command sets the text and background colors for the console window. When a console window is started, it uses the colors set using the Console Window property sheet Colors tab, as described in chapter 1. The COLOR command without any arguments returns the console window to these default colors. With a single argument, the COLOR command sets the text and background colors. The argument must be two characters long. The first character specifies the background color and the second character specifies the text color. Table 2.3 shows the color codes used.

Table 2.3 COLOR Command Color Codes

Code

Color

Code

Color

0

Black

8

Gray

1

Blue

9

Light Blue

2

Green

A

Light Green

3

Aqua

B

Light Aqua

4

Red

C

Light Red

5

Purple

D

Light Purple

6

Yellow

E

Light Yellow

7

White

F

Bright White

For example, this command sets a pleasing white on blue color combination:

C:\>color 17

TITLE

The TITLE command changes the title bar of the console window to the specified text. The text in the corresponding button on the task bar is also changed. The TITLE command is useful to show the progress of long or complex scripts. It is superior to ECHO for this purpose as it does not scroll text in the console window, and the text is visible in the task bar even when the console window is minimized. For example:

C:\>title Backup Drive C:...

@

The @ command controls command echo on a line-by-line basis. By default, the shell displays each command in a script before it is executed. Prefix a command with an @ character to suppress command echo. For example:

@title Welcome to the script!

The @ command can be placed within a compound command (described in the upcoming section "Running Multiple Commands") to control echo of individual portions of the command, although the utility of this is questionable. For example, this compound command will not echo when executed as part of a script:

@(echo starting...)&(title Script phase 1)

However, the command

(@echo starting...)&(title Script phase 1)

echoes as:

C:\>( )&(title Script phase 1)

ECHO

The @ command controls command echo on a command-by-command basis. The ECHO command controls command echo for an entire script. This command disables command echo:

C:\>echo off

This command enables command echo:

C:\>echo on

To display the current state of command echo, enter:

1. C:\>echo
2. ECHO is on.

The ECHO command is typically used at the start of a script to disable command echo for the duration of the script. For example, many scripts begin with this line:

@echo off

This disables echo for the entire script. The echo of the ECHO command is itself suppressed by using the @ command. (The example above is the first special script line that was shown in the section "Special Script Lines" in chapter 1.) Once echo is disabled (or enabled) in a script, the echo state is maintained within the script and within script procedures and nested scripts. The only exception to this is nested scripts executed via a CMD or START command. These scripts run in a new command shell, which always starts with echo enabled.

Echo can be disabled interactively at a command prompt by entering an ECHO OFF command. In this case, the command prompt is suppressed until echo is enabled again. Typed commands are still echoed during entry, however.

The current echo state is used when the command shell switches from Interactive mode to script mode to begin executing a script. Thus, if echo is enabled interactively, the script begins with echo enabled, and vice versa. However, the shell remembers the original interactive echo state, and recalls it when the script completes. Therefore, after a script ends, the echo state reverts to the value it had before the script began execution.

The ECHO command is also used to echo arbitrary text to the console window. For example:

C:\>echo Hello, world!

If command echo is disabled, the command itself is not echoed, but the text specified in the ECHO command is echoed. When used this way, the ECHO command is the Windows NT script equivalent of the PRINT statement found in many languages. Typically, ECHO is used with environment variable substitution, which is described in Chapter 3.

Tip The ECHO command cannot be used to echo an empty line. For example:

1. C:\>echo
2. ECHO is on.

As can be seen, the ECHO command displays the current state of command echo, not an empty line. The nearest equivalent is to echo something inconsequential, such as a single period. For example:

1. C:\>echo .
2. .

NOW [RK]

The NOW [RK] command also displays arbitrary text. However, NOW prefixes the text with the current time and date. This is useful when the time taken to execute a command must be monitored. For example:

1. E:\workdir>now Start
2. Wed Oct 21 12:20:07 1997 -- Start
3. E:\workdir>echo Quick command
4. Quick command
5. E:\workdir>now End
6. Wed Oct 21 12:20:18 1997 -- End
7. E:\workdir>

Command Redirection

Most console applications and commands generate output, and many accept input. This input or output is in the form of a stream of characters (either ANSI or Unicode). Applications generally work with up to three streams, as follows:

  • The command input stream is used by the application or command to read input. By default this stream comes from keys typed at the keyboard.

  • The command output stream is used by the application or command to display output. By default, this stream is displayed in the console window.

  • The command error output stream is used by the application or command to display errors. By default, this stream is displayed in the console window.

The default stream input and output provides normal interactive command operation: input is obtained from the keyboard, and output is displayed in the console window. Note that the distinction between the command output stream and the command error output stream is somewhat arbitrary. An application or command can direct output to whichever stream it wishes. Typically, however, normal output is sent to the command output stream, and errors are sent to the command error output stream.

The command shell provides facilities to change the default stream input and output. These facilities are accessed by placing special command redirection symbols in a command. Table 2.4 shows the command redirection symbols.

Table 2.4 Command Redirection Symbols

Symbol

Description

>file

Redirects command output to the file specified. You can also use a standard device name such as LPT1, CON, PRN or CONOUT$ as the file name. Any preexisting contents of the file are lost.

>>file

Redirects command output to the file specified. If the file already exists, all command output is appended to the end of the file.

<file

Redirects command input from the file specified. You can also use a standard device name such as CON or CONIN$.

2>file

Redirects command error output to the file specified. You can also use a standard device name such as LPT1, CON, PRN or CONOUT$ as the file name. Any preexisting contents of the file are lost.

2>&1

Redirects command error output to the same location as command output. This makes any command output redirection also apply to command error output.

cmd1 | cmd2

Pipes the command output of cmd1 to the command input of cmd2. Multiple pipe characters are allowed, creating a chain of commands, each sending output to the next command in the chain.

Command redirection symbols are not visible to the command. The shell processes them before the command is executed and they are not passed as arguments to the command. The <, >, and | symbols are reserved shell characters. If these symbols must be passed as command arguments, instead of being used as redirection symbols, then they must be escaped using the ^ character.

The > redirection symbol redirects command output to the specified file. For example:

C:\>dir >c:\dir.txt

This example creates a text file C:\DIR.TXT containing the output of the DIR command. The > symbol can be placed anywhere in the command, but is typically placed at the end of the command. A space is permitted between the > symbol and the file name. If the file specified by the redirection symbol already exists, any existing contents are deleted before the command is executed.

Tip Only one command output redirection symbol is allowed per command. It is not possible, for example, to duplicate command output by redirecting the command output to multiple files.

The >> redirection symbol redirects command output to the specified file, but concatenates the output onto the end of the file. For example:

C:\>dir >> c:\dir.txt

This example adds the output of the DIR command to the end of the file C:\DIR.TXT. If the file specified does not exist, it is created.

The < redirection symbol redirects command input from the specified file. For example:

C:\>sort <c:\dir.txt

This command sorts the contents of the file C:\DIR.TXT and then displays the result. A space is permitted between the < symbol and the file name. The < symbol is used less frequently than > and >>, since there are few shell commands which accept console input.

The 2> redirection symbol redirects command error output to the specified file. For example:

C:\>dir 2>c:\error.txt

This example redirects the error output of the DIR command to the file C:\ERROR.TXT. A space is permitted between the 2> symbol and the file name. Notice that this example does not redirect regular command output, so the directory listing is still displayed. Only error output (if any) is captured to the file.

The redirection symbols can be combined in a single command. For example:

C:\>sort <c:\dir.txt >c:\sortdir.txt 2>c:\error.txt

The 2>&1 redirection symbol redirects command error output to command output. This means that command error output is sent to the same destination as command output. For example:

C:\>dir >c:\dir.txt 2>&1

This command sends both command output and command error output to the file C:\DIR.TXT.

The | (pipe) redirection symbol sends the command output of cmd1 to the command input of cmd2. For example:

C:\>dir | sort

This example sends the command output of the DIR command to the command input of the SORT command. The output from the SORT command is then displayed. Alternatively, the SORT output can be sent to another command. For example:

C:\>dir | sort | more

This example sends the command output of the DIR command to the command input of the SORT command. Then, the command output of the SORT command is sent to the command input of the MORE command. Finally, the command output of the MORE command is displayed.

When the command shell processes a pipe (|) symbol, it actually runs both commands specified simultaneously. The right hand command is suspended until the left hand command begins generating command output. Then, the left hand command wakes up and processes the output. When this output has been processed, the command is again suspended until more input is available. The synchronization of both commands is handled automatically by the command shell and Windows NT.

The pipe symbol is both a redirection symbol and a compound command symbol. Compound commands are discussed in the next section.

Command redirection effects are inherited by nested commands. If a command starts with its command output redirected, and this command then starts additional commands, these commands inherit the same redirection as the parent command. This is frequently used with nested shells to capture all script output to a file. For example:

C:\>cmd /c myscript.bat >result.txt

This command executes the script MYSCRIPT.BAT in a new shell. Since the new command shell has its command output redirected to the file RESULT.TXT, all commands run by the shell (i.e. those in the script) also have their output redirected.

By default, all command input and output is processed as ANSI (or ASCII) characters. However, if the shell is started with the /U switch (see the "CMD" section in the "Command Reference"), command input and output is processed as Unicode characters. In this case, if a command generates ANSI output, the shell automatically converts ANSI command output to Unicode.

Running Multiple Commands

In previous sections, the simple "command and arguments" syntax of a shell command was described. The shell also supports compound commands, where a command line specifies more than one command to execute. Compound commands are indicated by special compound command symbols. Table 2.5 shows the compound command symbols.

Table 2.5 Compound Command Symbols

Symbol

Description

cmd1 & cmd2

Executes command cmd1, then command cmd2. Additional commands can be added using additional ampersand symbols.

cmd1 && cmd2

Executes command cmd1, then executes command cmd2 only if cmd1 completed successfully.

cmd1 || cmd2

Executes command cmd1, then executes command cmd2 only if cmd1 did not complete successfully.

( )

Use parentheses to indicate the nesting of complex multi-command sequences. Also used in IF ... ELSE commands.

The &, |, (, and ) symbols are reserved shell characters. If these symbols must be passed as command arguments, instead of being used as compound command symbols, then they must be escaped using the ^ character.

The simplest compound command symbol is &. The & symbol separates multiple commands on a single command line. For example:

1. C:\>echo Command 1 & echo Command 2
2. Command 1
3. Command 2

This example shows two ECHO commands on a single line. When & is used to separate multiple commands, the commands execute one at a time, starting with the first command. Each command runs to completion before the next command executes.

Any number of commands can be placed on a single line using the & symbol. For example:

C:\>dir c:\bin >files.txt & dir c:\dos >>files.txt & type files.txt

This example accumulates the results of two DIR commands into the file FILES.TXT and then displays the contents of this file. This example also shows that command redirection symbols can be used with each individual command in a compound command.

The && and || compound command symbols provide conditional command execution. The first (left) command is executed. If the && symbol is used, the second command executes only if the first command completed successfully. If the || symbol is used, the second command executes only if the first command did not complete successfully. A command completes successfully if it returns an exit code of 0 or no exit code at all. Exit codes are discussed in chapter 3. For example:

C:\>verify on || echo Verify command failed!!

Since the VERIFY command executed successfully, the ECHO command was not executed. However, in this example:

1. C:\>verify ox || echo Verify command failed!!
2. An incorrect parameter was
3. entered for the command.
4. Verify command failed!!

The ECHO command was executed because the VERIFY command syntax was incorrect, causing the command to exit with a non-zero error code.

Multiple commands can be chained together using additional && and || compound command symbols. For example:

C:\>dir && copy a b && echo OK!

The COPY command executes only if the DIR command succeeds, and the ECHO command executes only if the COPY command succeeds.

The parentheses symbols ( and ) are used to resolve command ambiguities and indicate the binding of compound command and redirection symbols. They are also used in the IF command and to specify multi-line commands.

For example, the following command collects two directory listings into the file FILES.TXT:

C:\>dir *.exe >files.txt & dir *.com >>files.txt

The following command might appear to do the same, but in fact it does not work:

C:\>dir *.exe & dir *.com >files.txt

This second example fails because the command redirection symbols have a higher precedence than the compound command symbols. The shell interprets this command as follows:

1. C:\>dir *.exe
2. C:\>dir *.com >files.txt

This displays the result of the first DIR command in the console window—which is not the desired effect.

The second example can be corrected by using parentheses to alter the binding of the various symbols, as follows:

C:\>(dir *.exe & dir *.com) >files.txt

This compound command executes two DIR commands, one after the other. The output of both commands is redirected into the file FILES.TXT. The parentheses change the binding of the command symbols. Notice that this command is far cleaner than the earlier example, and that the file FILES.TXT is only specified once in the command.

Parentheses can be nested to specify arbitrarily complex compound commands. For example:

C:\>((echo command1) & (echo command2)) && (echo command 3)

An opening parenthesis can be placed anywhere on a command where a command-name is expected. When a command is enclosed in parentheses, either a closing parenthesis or a compound command symbol marks the end of the command. For example:

1. C:\>echo (command)
2. (command)
3. c:\>(echo command)
4. command

Notice that the second ECHO command did not echo the closing parenthesis. In this case, the shell treats this as the end of the command, and this parenthesis is not passed as part the ECHO arguments. In the first case, the command itself does not begin with a parenthesis, and so the end of line marks the end of the command. In this case, the entire (command) text is passed to the ECHO command.

Parentheses can also be used to enter multi-line commands. If a command line ends with one or more sets of unbalanced parentheses, the command line is assumed to continue on the next line. If the command was entered interactively, the shell prompts for more input until all parentheses balance. If the command is part of a script, the shell reads additional script lines until all the parentheses balance. For example:

1. C:\>(
2. More?echo command1
3. More?echo command2
4. More?)
5. command1
6. command2

The first line consists only of an open parenthesis. The shell detects this, and prompts for more input. Next, two ECHO commands are entered. Finally, a closing parenthesis balances the opening parenthesis and the command is complete. The shell then executes the compound command, which executes the two individual ECHO commands.

Individual commands do not span lines in multi-line commands. The end of a physical line always terminates a simple command (either as typed or as entered in a script file). Notice in the preceding example how the end of the physical line terminated each ECHO command.

Compound commands and multi-line commands are particularly useful with IF and FOR statements. These commands are described in Chapter 4. For example:

1. if exist *.bak (
2.     echo Deleteing *.BAK files...
3.     del *.bak
4. )

The IF command executes the following command if one or more .BAK files exist in the current directory. Parentheses are used to execute a compound multi-line command. In this example, the ECHO command displays a warning, and then the DEL command deletes the files. The indentation here is not mandatory, but does help to indicate the flow of control.

Tip Using a parenthesis, even when not strictly needed, is a useful way to increase script readability, and makes explicit the command execution precedence rules.

Using Command Filters

The previous sections showed how individual commands can be combined using command redirection and compound command symbols. Although command redirection can be used with any command, it is most effective with commands that are specifically designed as command filters. Generally, a command filter reads command input, permutes, or processes the input in some manner, and then writes the permuted input to its command output. Command filters are typically connected to other commands and each other via the pipe (|) redirection symbol.

Command filters are frequently used in scripts to extract specific information needed by a script. Typically, a FIND command can filter the output of a command, extracting only the line (or lines) which contain the required information. The script can then further process this filtered data. Many of the sample scripts in Part II use this technique.

Windows NT provides four command filters:

  • The MORE command, which is used to paginate command output.

  • The SORT command, which can sort command output alpha-numerically.

  • The FIND command, which filters lines that contain a specified text string.

  • The CLIP [RK] command, which captures command output to the Windows NT clipboard.

MORE

The MORE command breaks its command input into pages. A page is the same number of lines as the console window. For example:

C:\>dir | more

This command displays the current directory, one page at a time. Press the spacebar to advance to the next page. The MORE command supports several switches to control the output format. These are detailed in the MORE section of the "Command Reference."

SORT

The SORT command sorts its command input alpha-numerically, using the ASCII collating sequence. For example:

C:\>sort <data.txt

This command sorts the contents of file DATA.TXT and displays the result. By default, the SORT command sorts in ascending order. The /R switch sorts in reverse (descending) order. Lines are sorted based on the data at the start of each line. Use the +n switch to sort based on data starting at column n on each line. For example:

C:\>dir | sort +14

This command sorts the output of the DIR command based on data starting at column 14 on each line.

FIND

The FIND command filters command input, passing to its command output only those lines which contain a specified string. For example:

C:\>dir | find "<DIR>"

This command filters only directory lines from the output of the DIR command. The FIND command supports several switches to control the filtering process—these are detailed in the FIND topic of the "Command Reference." One useful switch is /C, which outputs only a count of the lines which match the string, instead of the lines themselves. For example:

C:\>dir | find "<DIR>" /c

This command counts the number of directories in the current directory.

Tip Windows NT also supports the more powerful FINDSTR command, which provides more sophisticated filtering capabilities. However, FINDSTR works with files as input. FINDSTR is described in the "Command Reference."

CLIP [RK]

The CLIP [RK] command places its command input into the clipboard. For example:

C:\>dir | clip

This command dumps the output of the DIR command into the clipboard. Once in the clipboard, the text can be pasted into any Windows application.

The Windows NT Command Scheduler

Windows NT provides a special feature called the Schedule Service that can execute any command or application periodically or at a specified time and date. Scheduled commands can execute even if there is no user logged on to the computer. The Schedule Service is therefore ideal for running periodic maintenance tasks, such as file backups. For example, the REPL.BAT sample script in Part II uses the Schedule Service to provide periodic file replication services.

The Schedule Service is controlled through several shell commands. These commands can control the service either on the local computer or any computer on the network (assuming that the user has sufficient rights to access that computer). The ability to control the Schedule Service remotely is particularly useful for system administrators managing many servers.

The two most common mistakes made when using Windows NT involve the setup and use of the Schedule Service:

  • First, the Schedule Service, like all services, logs on by default as the LocalSystem account. Typically, this account has insufficient rights to perform many operations (such as accessing network drives).

  • Second, because the Schedule Service operates independently of a user logon, drive mappings and other per-user settings are not necessarily available when a scheduled command executes. For example, the environment available to a command executed by the schedule service is restricted to the system environment set via Control Panel.

Fortunately, both these problems are easily solved. Creating a special account exclusively for the Schedule Service (named, for example, ScheduleService) solves the first problem. This account is then assigned whatever access rights and group memberships are needed to ensure that any scheduled commands are successful. Explicitly mapping all required resources within a scheduled script (such as network drives) solves the second problem. Alternatively, use UNC names directly in commands.

For example, assume a logon script maps drive X: to \\SERVER\COMMON. This command, which operates correctly when used interactively, fails when used with the Schedule Service:

copy x:\myfiles\*.bak c:\backups

The Schedule Service does not execute the logon script, so drive X: is not available. The first solution to this problem uses the NET command to explicitly map drive X: in the script. For example:

1. net use x: \\server\common
2. copy x:\myfiles\*.bak c:\backups
3. net use x: /delete

The second solution uses UNC names directly. For example:

copy \\server\common\myfiles\*.bak c:\backups

Virtually all built-in commands, and most external commands, accept UNC names as well as path names as arguments.

The final stage to prepare the Schedule Service for use is starting the service. Typically, the start-up options for this service are changed to require the service to automatically start whenever Windows NT boots. Both of these operations can be accomplished via the Control Panel Services applet. Figure 2.6 shows the Services applet running. The Schedule Service is named Schedule. Click the Start button to start the service, or the Stop button to stop the service.

Click the Startup button to set service startup options. Figure 2.7 shows the startup options dialog box. Typically, the Startup Type should be Automatic, and the Log On As option should be the account setup specifically for the schedule service.

Cc723564.shell06(en-us,TechNet.10).gif

Figure 2.6: The Control Panel Services applet

Once the Schedule Service is running, commands can be scheduled using either the AT command or the SOON [RK] command. Refer to the "Command Reference" for a detailed description of these commands. The Windows NT Resource Kit also provides a GUI interface to the Schedule Service, called WINAT.

Figure 2.7: Schedule Service startup options

Figure 2.7: Schedule Service startup options

By default, all AT commands manage the schedule service on the local computer. Specify the computer name as the first argument to manage the service on another computer. For example, this command lists all scheduled commands on the current computer:

1. C:\>at
2. Status  ID  Day  Time  Command Line
3. ---------------------------------------------------------------------------
4. 0  Each  F  8:00 PM  "e:\Tools\NAVNT\NAVWNT" /L

This command lists all scheduled commands on the computer CRAFT:

C:\>at \\craft

Enter an AT command and specify the execution time and the command to execute to schedule a command for execution. For example:

C:\>at 23:00:00 /every:monday cmd /c sysbkup.bat

This command schedules the command CMD /C SYSBKUP.BAT to execute at 11 p.m. The command is executed every Monday whenever the system clock indicates the time is 11 p.m.

The SOON [RK] command schedules a command to execute a certain number of seconds in the future. For example:

C:\>soon 600 "cmd /c sysbkup.bat"

This command schedules the command CMD /C SYSBKUP.BAT to execute in 10 minutes (600 seconds) time. SOON can be used to setup a script for periodic execution. Simply place a SOON command as the first line of the script. For example, place this line as the first line in MYSCRIPT.BAT:

soon 600 "cmd /c myscript.bat"

Then manually schedule MYSCRIPT.BAT to execute once. The first time MYSCRIPT.BAT executes, it reschedules a new copy of itself to run in ten minutes. Thus, every 10 minutes, a new copy of MYSCRIPT.BAT is executed.

Posted by gofly

댓글을 달아 주세요

   ADDUSERS Add or list users to/from a CSV file
   ARP      Address Resolution Protocol
   ASSOC    Change file extension associations•
   ASSOCIAT One step file association
   ATTRIB   Change file attributes
b
   BCDBOOT  Create or repair a system partition
   BOOTCFG  Edit Windows boot settings
   BROWSTAT Get domain, browser and PDC info
c
   CACLS    Change file permissions
   CALL     Call one batch program from another•
   CD       Change Directory - move to a specific Folder•
   CHANGE   Change Terminal Server Session properties
   CHKDSK   Check Disk - check and repair disk problems
   CHKNTFS  Check the NTFS file system
   CHOICE   Accept keyboard input to a batch file
   CIPHER   Encrypt or Decrypt files/folders
   CleanMgr Automated cleanup of Temp files, recycle bin
   CLEARMEM Clear memory leaks
   CLIP     Copy STDIN to the Windows clipboard.
   CLS      Clear the screen•
   CLUSTER  Windows Clustering
   CMD      Start a new CMD shell
   CMDKEY   Manage stored usernames/passwords
   COLOR    Change colors of the CMD window•
   COMP     Compare the contents of two files or sets of files
   COMPACT  Compress files or folders on an NTFS partition
   COMPRESS Compress individual files on an NTFS partition
   CON2PRT  Connect or disconnect a Printer
   CONVERT  Convert a FAT drive to NTFS.
   COPY     Copy one or more files to another location•
   CSCcmd   Client-side caching (Offline Files)
   CSVDE    Import or Export Active Directory data 
d
   DATE     Display or set the date•
   DEFRAG   Defragment hard drive
   DEL      Delete one or more files•
   DELPROF  Delete NT user profiles
   DELTREE  Delete a folder and all subfolders
   DevCon   Device Manager Command Line Utility 
   DIR      Display a list of files and folders•
   DIRUSE   Display disk usage
   DISKCOMP Compare the contents of two floppy disks
   DISKCOPY Copy the contents of one floppy disk to another
   DISKPART Disk Administration
   DNSSTAT  DNS Statistics
   DOSKEY   Edit command line, recall commands, and create macros
   DSACLs   Active Directory ACLs
   DSAdd    Add items to active directory (user group computer) 
   DSGet    View items in active directory (user group computer)
   DSQuery  Search for items in active directory (user group computer)
   DSMod    Modify items in active directory (user group computer)
   DSMove   Move an Active directory Object
   DSRM     Remove items from Active Directory
e
   ECHO     Display message on screen•
   ENDLOCAL End localisation of environment changes in a batch file•
   ERASE    Delete one or more files•
   EVENTCREATE Add a message to the Windows event log
   EXIT     Quit the current script/routine and set an errorlevel•
   EXPAND   Uncompress files
   EXTRACT  Uncompress CAB files
f
   FC       Compare two files
   FIND     Search for a text string in a file
   FINDSTR  Search for strings in files
   FOR /F   Loop command: against a set of files•
   FOR /F   Loop command: against the results of another command•
   FOR      Loop command: all options Files, Directory, List•
   FORFILES Batch process multiple files
   FORMAT   Format a disk
   FREEDISK Check free disk space (in bytes)
   FSUTIL   File and Volume utilities
   FTP      File Transfer Protocol
   FTYPE    Display or modify file types used in file extension associations•
g
   GLOBAL   Display membership of global groups
   GOTO     Direct a batch program to jump to a labelled line•
   GPUPDATE Update Group Policy settings
h
   HELP     Online Help
i
   iCACLS   Change file and folder permissions
   IF       Conditionally perform a command•
   IFMEMBER Is the current user in an NT Workgroup
   IPCONFIG Configure IP
k
   KILL     Remove a program from memory
l
   LABEL    Edit a disk label
   LOCAL    Display membership of local groups
   LOGEVENT Write text to the NT event viewer
   LOGMAN   Manage Performance Monitor
   LOGOFF   Log a user off
   LOGTIME  Log the date and time in a file
m
   MAPISEND Send email from the command line
   MBSAcli  Baseline Security Analyzer. 
   MEM      Display memory usage
   MD       Create new folders•
   MKLINK   Create a symbolic link (linkd)
   MODE     Configure a system device
   MORE     Display output, one screen at a time
   MOUNTVOL Manage a volume mount point
   MOVE     Move files from one folder to another•
   MOVEUSER Move a user from one domain to another
   MSG      Send a message
   MSIEXEC  Microsoft Windows Installer
   MSINFO   Windows NT diagnostics
   MSTSC    Terminal Server Connection (Remote Desktop Protocol)
   MUNGE    Find and Replace text within file(s)
   MV       Copy in-use files
n
   NET      Manage network resources
   NETDOM   Domain Manager
   NETSH    Configure Network Interfaces, Windows Firewall & Remote access
   NETSVC   Command-line Service Controller
   NBTSTAT  Display networking statistics (NetBIOS over TCP/IP)
   NETSTAT  Display networking statistics (TCP/IP)
   NOW      Display the current Date and Time 
   NSLOOKUP Name server lookup
   NTBACKUP Backup folders to tape
   NTRIGHTS Edit user account rights
o
   OPENFILES Query or display open files
p
   PATH     Display or set a search path for executable files•
   PATHPING Trace route plus network latency and packet loss
   PAUSE    Suspend processing of a batch file and display a message•
   PERMS    Show permissions for a user
   PERFMON  Performance Monitor
   PING     Test a network connection
   POPD     Restore the previous value of the current directory saved by PUSHD•
   PORTQRY  Display the status of ports and services
   POWERCFG Configure power settings
   PRINT    Print a text file
   PRINTBRM Print queue Backup/Recovery
   PRNCNFG  Display, configure or rename a printer
   PRNMNGR  Add, delete, list printers set the default printer
   PROMPT   Change the command prompt•
   PsExec     Execute process remotely
   PsFile     Show files opened remotely
   PsGetSid   Display the SID of a computer or a user
   PsInfo     List information about a system
   PsKill     Kill processes by name or process ID
   PsList     List detailed information about processes
   PsLoggedOn Who's logged on (locally or via resource sharing)
   PsLogList  Event log records
   PsPasswd   Change account password
   PsService  View and control services
   PsShutdown Shutdown or reboot a computer
   PsSuspend  Suspend processes
   PUSHD    Save and then change the current directory•
q
   QGREP    Search file(s) for lines that match a given pattern.
r
   RASDIAL  Manage RAS connections
   RASPHONE Manage RAS connections
   RECOVER  Recover a damaged file from a defective disk.
   REG      Registry: Read, Set, Export, Delete keys and values
   REGEDIT  Import or export registry settings
   REGSVR32 Register or unregister a DLL
   REGINI   Change Registry Permissions
   REM      Record comments (remarks) in a batch file•
   REN      Rename a file or files•
   REPLACE  Replace or update one file with another
   RD       Delete folder(s)•
   RMTSHARE Share a folder or a printer
   ROBOCOPY Robust File and Folder Copy
   ROUTE    Manipulate network routing tables
   RUN      Start | RUN commands
   RUNAS    Execute a program under a different user account
   RUNDLL32 Run a DLL command (add/remove print connections)
s
   SC       Service Control
   SCHTASKS Schedule a command to run at a specific time
   SCLIST   Display NT Services
   SET      Display, set, or remove environment variables•
   SETLOCAL Control the visibility of environment variables•
   SETX     Set environment variables permanently
   SFC      System File Checker 
   SHARE    List or edit a file share or print share
   SHIFT    Shift the position of replaceable parameters in a batch file•
   SHORTCUT Create a windows shortcut (.LNK file)
   SHOWGRPS List the NT Workgroups a user has joined
   SHOWMBRS List the Users who are members of a Workgroup
   SHUTDOWN Shutdown the computer
   SLEEP    Wait for x seconds
   SLMGR    Software Licensing Management (Vista/2008)
   SOON     Schedule a command to run in the near future
   SORT     Sort input
   START    Start a program or command in a separate window•
   SU       Switch User
   SUBINACL Edit file and folder Permissions, Ownership and Domain
   SUBST    Associate a path with a drive letter
   SYSTEMINFO List system configuration
t
   TASKLIST List running applications and services
   TASKKILL Remove a running process from memory
   TIME     Display or set the system time•
   TIMEOUT  Delay processing of a batch file
   TITLE    Set the window title for a CMD.EXE session•
   TLIST    Task list with full path
   TOUCH    Change file timestamps    
   TRACERT  Trace route to a remote host
   TREE     Graphical display of folder structure
   TYPE     Display the contents of a text file•
   TypePerf Write performance data to a log file
u
   USRSTAT  List domain usernames and last login
v
   VER      Display version information•
   VERIFY   Verify that files have been saved•
   VOL      Display a disk label•
w
   WHERE    Locate and display files in a directory tree
   WHOAMI   Output the current UserName and domain
   WINDIFF  Compare the contents of two files or sets of files
   WINMSD   Windows system diagnostics
   WINMSDP  Windows system diagnostics II
   WINRM    Windows Remote Management
   WINRS    Windows Remote Shell
   WMIC     WMI Commands
x
   XCACLS   Change file and folder permissions
   XCOPY    Copy files and folders
   ::       Comment / Remark•

Commands marked • are Internal commands only available within the CMD shell.
All other commands (not marked with •) are external commands which may be used under the CMD shell, PowerShell, or directly from START-RUN.

Windows RUN Commands, Microsoft Help pages: Windows XP - 2003 Server - 2008 Server
Discussion forum
Links to other Sites, books etc...

'Software Story' 카테고리의 다른 글

jQuery HTML5 Fullscreen Slideshow  (0) 2012.02.23
The Windows NT Command Shell  (0) 2011.03.06
Windows CMD 정릴  (0) 2011.03.06
New JS APIs of HTML5  (1) 2010.07.29
HTML 5 Guide(PDF)  (0) 2010.07.21
iOS 4의 키보드 부분 Review  (2) 2010.06.25
Posted by gofly

댓글을 달아 주세요

우선 이 글은 HTML5 소개 프레젠테이션 을보고 하나하나 정리해 나가는 것입니다.

1.New Selector
일단 첫 번째 변화한 부분은 Selector인 것 같습니다. 기존의 document.getElementById()와 document.getElementByTagName()은 그대로 존재합니다.

이번에 DOM API로 새로 추가 된 것은, document.getElementsByClassName()가 새로 추가 된 듯 합니다.
스타일시트(CSS)의 Class를 적용한 Tag를 찾아내어 배열(Array)반환 합니다.[배열로 반환하기 때문에,
어떤 값을 얻어 내려면 배열에 접근을 해야겠죠?]

또, CSS Syntax를 이용하는 Selector API가 추가 되었는데, 기존에 CSS를 작성 할 때, 다양한 방법으로
Element를 선택하여 스타일을 적용했었는데, 이 기능을 API화해서 HTML5의 Selector에 추가하였습니다.

document.querySelectorAll("ul li:nth-child(odd)");
document.querySelectorAll("table.test > tr > td");

이와 같은 Selector API는 Jquery에서난 가능했던 부분인데, 이제는 기본 API의 기능으로 제공하네요.
참 반가운 기능입니다.

2.Web Storage
일전에 Web에서는 페이지가 Load될 때마다 데이터를 새로 불러왔습니다. 물론 Tag들도 다시 parsing했었죠.
이 경우에 한 가지 않좋은 점은 기존에 글을 쓰고 있다거나 할 경우 모든 것이 없어 질 수도 있다는 것이었습니다.

이번 HTML5에는 이 부분에 대한 API가 새로 추가 되었는데 다음과 같다.

textarea.addEventListener('keyup', function () { window.localStorage['value'] = area.value; window.localStorage['timestamp'] = (new Date()).getTime();
}, false);textarea.value = window.localStorage['value'];

여기에서 눈 여겨 보아야 할 부분이 바로 localStoragesessionStorage API입니다.
localStorage는 반영구적으로 데이터를 가지고 있습니다. 심지어 브라우저를 껐다고 해도 남아있습니다.
sessionStorage는 브라우저가 살아있는 동안에는 계속 데이터를 가지고 있습니다.
유효기간만 지정하지 않는 것만 빼면, 쿠키(Cookie)와 같다고 보시면 됩니다.

위 예문의 localStorage는 그대로 sessionStorage로 바꿔서 사용하실 수 있습니다.

여기서 표현은 못하지만 실제로 해보니 신기하더군요. 2틀 후에 와서 예제 사이트 열었는데 textarea안에 있는
글씨가 여전히 남아 있더군요;;;;

잘만 활용 한다면 Ajax나 js plugin(예:jquery)을 써서 동적 웹을 구현하던것을, 이제는 이 HTML5 API를 써서
간단히 구현할 수 있을것 같습니다.

3.Web SQL Database
HTML5는 참으로 다양한 API를 지원합니다. 그 중에 JS부분에 새로 추가되었으며, 눈에 띄는 것은 Database를
처리할 수 있는 API라 할 수 있습니다. 한국 표준 웹 커뮤니티의 "HTML5 표준 가이드"에 보면 WHATWG에서
처음으로 HTML5를 만들고 규격화 할 때 W3C의 방법과 다르게 기존의 웹 개발자들을 표준안을 정하는데, 의견을
낼 수 있게했다고 합니다. 그 이유인 즉, HTML5는 기존에 표준을 만들었던 대 기업(MS, Mozilla)등과는 다르게
웹개발자들이 실질적으로 필요로 하는 기능을 모아서 표준을 만들려고 했다는 겁니다.

그래서 그런지 참, JS에서 Transaction까지 지원하면서 로컬 DB에 Insert, Update, Delete, Select까지
지원한다고 하니 놀랍네요. 물론 기존에 JS로도 DB와 연결을 맺고 데이터 처리(Data Munipulation)할 수
있었지만,
보안문제가 문제가 되었던게 사실인데, 이번 API로 사실상 공직적으로 지원한다는 것은 Sandbox에
대한 믿을 수 있는
보안부분이 생겼다고 볼 수 있지 않나 하고 생각해 봅니다.

사용법은 다음과 같습니다.
 
var db = window.openDatabase("Database Name", "Database Version");
db.transaction(fucntion(tx) {
tx.excuteSql("SELECT * FROM test", [], succesCallback, errorCallback);
});

//CREATE TABLE Table1Test (id Real Unique, text TEXT)
//INSERT INTO Table1Test (id, TEXT) VALUES (? ,?)
//DELETE FROM Table1Test WHERE id = ?

4.Web Application Cache API
이 부분은 앞서 설명한 Web Storage부분과 비슷한 부분입니다.
HTML5 표준 가이드 에서는 이렇게 이야기 합니다. "오프라인 상대에서도 웹 어플리케이션의 접근을 가능케 하는
매우
중요한 기능이다."

이 캐싱 메카니즘은 기존의 웹브라우저와 차이가 있다고 합니다. 오프라인 상태에서 개발자의 예상대로 작동하고
신뢰할 수
있는 새로운 인터페이스 인 것입니다.

이것은 3가지 이점을 갖는다고 합니다.

1.오프라인 브라우징 - 오프라인 상태에서도 사용자가 사이트에 접근할 수 있다.
2.속도 향상 - 로컬 영역에 저장된 리소스들은 매우빠른 로드 속도로 호출된다.
3.서버 부하 감소 - 브라우저는 오직 리소스가 변경된 경우에만 다운로드를 시도한다.

캬캬 제공자나, 제공 받는자나 속도나 여러가지 면에서 장점이 많을 듯 하네요. 다음은 활용 태그 입니다.

<html manifest="cache-manifest">
window.applicationCache.addEventListener('checking', updateCacheStatus, false);

첫번째 줄은 무조건 "CACHE MANIFEST" 라는 문자열을 포함해야합니다. 각 라인은 캐시할 리소스의
URL 또는 주석을 포합니다.

manifest 파일의 내용만으로 Refresh 여부를 판단.

각 파일의 내용이 바뀌었는지는 판단하지 않음. text/cache-manifest MIME 타입으로 전송되어야 함.

javascript event 를 통해 caching 진행여부를 알수 있음.

Window.applicationCache.update(); 및 swapCache(); 함수로 캐시를 강제로 업데이트 가능.

이제 이 기능으로 오프라인에서도 사이트에 접근할 수 있음을 기억하자!!!!

5.Web Workers
Web Workers는 두가지 장점이 있다고 합니다.
첫 째는 스피드고, 둘 째는 브라우저에 부담을 주지 않고 백그라운드에서 스크립트 연산을 할 수 있다는 것이다.
이것이 가능한 이유는 브라우저가 OS단위의 쓰레드를 생성하기 때문이며, 동시적으로 사용되는 경우
정말 흥미로운 결과를 기대 할 수 있다는 것입니다.

기존읜 Javascript는 단일 쓰레드만 지원 했던 것과는 달리, Web Workers에는 다중 쓰레드를 지원한다.
단 주의할 점은 DOM에 접근이 안됨으로 단순계산 업무에만 사용해야 한다는 것입니다.

main.js:
  var worker = new Worker(‘extra_work.js');
  worker.onmessage = function (event) { alert(event.data); }; 

extra_work.js:
  // 작업을 진행하고, 작업이 끝나면 postMessage 호출.
  postMessage(some_data);

6.Web Socket
Web Socket을 간단히 설명하자면 한 웹 페이지에서 서로 다른 서버에 있는 웹 페이지에 양방향 통신을 할
수 있는 별도 프로토콜을 정의할 수 있는 API라고 합니다.

기존의 Javascript는 다른 도메인의 내용을 가지고 올 수 없었던 것에 비해서(하부 도메인도 별도의 Sandbox처리
-인증-를 해줘야 데이터를 가지고 올 수 있었음) 이 Web Socket은 다른 도메인과의 통신을 안전하게 지원한다는
것이다.

var socket = new WebSocket(location); socket.onopen = function(event) {
socket.postMessage(“Hello, WebSocket”);
}




socket.onmessage = function(event) {
  alert(event.data); } socket.onclose = function(event) { alert(“closed”);
}

이 기능으로 서버에서 브라우저로 데이터 푸쉬가 가능해 졌다. 기존에 사용자는 웹서버에서 데이터의 변화를
체크하기
위해서 새로고침이나 내부적으로 XMLHttpRequest와 같은 Ajax기술(좀 복잡함)을 이용해야 했던 것과
달리 이 기술은
한 번 연결되면 헤더교환이 필요없기때문에 구현이 간단하고 네트웍 트래픽이 효율적입니다.



Web Socket Protocol : ws:// , wss:// - HTTP를 이용하여 업그레이드.




서버측은 따로 구현해야 하므로, 기존 웹서버가 확장지원하거나 새로운 서비스들이 등장하고 있음.
( Node.js , phpwebsocket ) 기존에 플래스/플렉스/실버라이트가 제공하던 장점중의 하나인 소켓연결이
가능해짐. HTML5 Quake II 의 경우 - Web Sockets 를 사용하여 멀티플레이 구현된다고 합니다.

사실상 이 기능은 TCP for the Web 즉 웹 어플리 케이션을 위한 쌍방향 통신 기술인 것 입니다.

WebSocket to support online Multiplayer
WebGL & Canvas ,
HTML Audio ,
Web Storage - Local Storage API Jake2 (Java port of Quake2) is compiled to Javascript using GWT

위의 동영상에서 주의 깊게 봐야 할 것은 웹 브라우저에서 Quake III가 동작하고 있다는 것입니다.
눈에 확 들어 오는건 WebGL이라는 기술 입니다.

6.Drag and drop
이 API가 흥미로운 점은 기존에 Drag and drop기능을 Javascript에서는 드래그 하려는 대상에 이벤트를
발생시켜
대상이 클릭되었을 때와 그래그할 때, 또 x,y 좌표값을 얻어내서 여러가지 처리를 해야 했던 것과는
달리 태그에
draggable 라는 Attribute만 추가하면 대상이 될 수 있다는 것이다.

document.addEventListener('dragstart', function(event) {
   event.dataTransfer.setData('text', 'Customized text');
   event.dataTransfer.effectAllowed = 'copy';
}, false);

드래그 가능하게 만들려면 - draggable 이라는 속성만 추가하면 됩니다. <img src='aa' draggable />
drag , drop , dragstart , dragend , dragenter , dragleave , dragover 이벤트등의 이벤트를 지원합니다.
아이폰은 touchStart,touchEnd,touchMove,touchCancel 등의 이벤트도 따로있음 (멀티터치 지원)
( 아이폰으로 sizac.kr 접속후 아이콘 수정화면 참고 )
gestureStart , gestureEnd , gestureChange 형태로 제스쳐도 지원합니다.

7.Geolocation
JS API의 마지막 은 Geolocation기능입니다. 예전에 수치로 하던 위치기반 기능과는 달리 API로 간단하게 자신의
위치를 알 수 있는 기능들이 지원된다.

if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
    var lat = position.coords.latitude;
    var lng = position.coords.longitude;
    map.setCenter(new GLatLng(lat, lng), 13);
    map.addOverlay(new GMarker(new GLatLng(lat, lng)));    
  });

8.마무리
참 맘에 드는 것은 이번 HTML5의 표준들이 웹개발자들이 바라던 부분을 많이 반영했다는 것이다. 그 이유는
HTML5표준을
정할 때, 웹 개발자들이 대거 참여했기 때문이다. W3C에서 표준을 만들었다면 형식에 있어서 이렇게
파격적인 변화가
있었을까 하고 의심해봅니다. 현제 HTML5는 기능이 모두 구현이 된 것이 아니라고 합니다.
W3C W/G(Working Group),
WHATWG, WebApp W/G에서 각각 구현중이 라고 합니다.
앞으로 어떤 기능들이 더 추가 될 지 궁굼해 지는 군요.

또, 당부해 놔야 할 점은 XHTML로 구현된 웹들에 대해서 XHTML 2.0은 사실상 W3C에서 더이상 표준 진행을 하지
않음을 걱정 하시는 분들이 있을 듯 한데, Brad Colbow라는 사람이 그린
"마크업의 오해"(Misunderstanding Markup: XHTML 2/HTML 5 Comic Strip) 만화에서 이 부분에 대해서
다음과 같이 비교해 놨습니다.

HTML4와 XHTML1.0,1.1은 우유와 치즈 처럼 같은 유제품 이지만 XHTML 2.0인 두유(Soy Milk)라는 것입니다.
즉 아무런 연관성이 없다는 것이죠. 즉 XHTML2.0은 새롭게 시도되는 표준이었고,
그 수준이 굉장히 방대했다고 합니다.

걍 XML이라고 하는 것도 과언은 아닌듯 하더군요(저의 생각) 종전의 웹 개발자들은 걱정할 필요가 없는 것이
HTML5는 과거의 태그 즉 HTML4개열과 XHTML1.0,1.1을 지원하면서, 미래 지향적으로 HTML5를 지원한다고
합니다.

뭐 그게 가능한 이유는 앞으로 HTML5를 지원하는 웹브라우저는 문서 선언으로 태그를 읽고 렌더링 하는 것을 결정
하고 과거의 XHTML1.0,1.1로 파싱한 태그를 렌더링 할지, HTML5로 렌더링 할지를 결정한다고 하네요.

그러니 기존의 웹 개발자는 과거에 개발해 놓았지만, HTML5에서 지원하지 않는 태그(현제 HTML5는 단계적으로 
기능을 축소하고 있습니다. 그 이유는 CSS기능과 태그의 기능이 겹치기 때문이죠 b 태그처럼요)를 사용했다고 해서
걱정할 필요는 없다는 것입니다. 물론 문서 선언을 잘했다는 가정에서 말이죠....^^

다음은 HTML 부분을 살펴 보겠습니다. HTML5표준 가이드를 보니까 아주 흥미롭더군요. 웹 표준 가이드에 "삽질"
단어를 써가며 이제는 그럴 필요가 없어졌다는 이야기를 하더군요...다음 포스팅에 살펴보겠습니다.




'Software Story' 카테고리의 다른 글

The Windows NT Command Shell  (0) 2011.03.06
Windows CMD 정릴  (0) 2011.03.06
New JS APIs of HTML5  (1) 2010.07.29
HTML 5 Guide(PDF)  (0) 2010.07.21
iOS 4의 키보드 부분 Review  (2) 2010.06.25
아이폰 도난 걱정 뚝! 어플로 ‘도난방지’  (0) 2010.06.17
Posted by gofly
TAG API, APIS, html, HTML5, js, JSAPIs

댓글을 달아 주세요

  1. 눙ㄹ 2012.08.28 23:39  댓글주소  수정/삭제  댓글쓰기

    좋은 정보 감사합니다~~~
    초보들도 이해하기 쉽게 해주셨네요 ㅎㅎ







한국 웹 표준 커뮤니티[클릭하면 싸이트로 연결됩니다.]에서 Creative Commons Attribution Share-Alike License v3.0 의 라이센스를 이용하여 배포한 가이드 입니다.[http://webstandards.or.kr/html5]

예전에 소프트웨어 진흥원에서 배포한 "실전 HTML 표준 가이드"와 같은건데 이번엔 HTML5에 대해서 정리를 해 놓은듯 합니다.

듣기로 예전에 HTML 4.0.1과 XHTML 1.1 일때는 2.0이 있었지만 주로 XML을 스키마로 사용하는 XHTML을 사용하도록 권장했던 것 과는 달리, 더이상 XHTML 버전을 만들지 않고, HTML5로 간다고 하더군요.

이유인 즉, XHTML 1.1 이후 2.0이 나왔는데, 기존에 XHTML 1.1은 HTML의 태그를 기본 제공하고, 사용자가 확장하여 태그를 만들 수 있었던 것과는 달리 XHTML 2.0은 완전히 다른 태그를 제공했다고 합니다. 사용자의 측면에서는 새로 뭔가 배워야 한다는 중압감이 있는 거죠.

그런 중압감을 없애고 조금더 많은 기능을 지원하면서 심플함을 지향하게 된 것이 HTML5라고 합니다.

HTML5의 특징은 기존에 태그(HTML 4.0.1, XHTML 1.0,1.1)의 기능을 CSS에서도 사용할 수 있었죠 예를 들어 <font size="12" style="fontweight:bold" /> 이런 식의 태그들이 CSS에서도 font { size:5; fontweight:bold;}이렇게 정의 할 수 있었죠.

그런데 이번 버젼(HTML5)에서는 이런 태그들을 과감히 없애고, CSS에서 스타일을 주도록 했다고 합니다.

그도 그럴 것이 소프트웨어 진흥원에서 배포한 W3C에서 리코멘드하는 부분만 모아 발표했던 "실전 표준 HTML 가이드"에서도 웹페이지를 만들때, HTML과 CSS 그리고 Javascript를 분리해서 조금더 직관적인 html 파일을 만들 것을 권장했던 거죠. 

그래야, 접근성이 뛰어나 진다고.....HTML5는 어떻게 보면 개발자에게 맡겨두었던 선택의 폭을 이번에 과감하게, 리코멘데이션 하는쪽으로 기반을 두고 처음 부터 만들어 사용자의 선택보다 레코멘드 하는쪽(W3C)으로 개발자의 선택의 폭을 확고히해 두려는 의도인 것 같습니다.

그도 그럴 것이, 브라우저마다 레이아웃에 문제가 생기고, 시각장애우처럼 접근성이 떨어지는 웹에는 정보를 전달받을 수 없는 사람들을 고려해야 하기 때문이라고 생각합니다. 그래야 웹의 힘은 더욱 막강해지니까요..

아무튼 이번 웹 표준 커뮤니티에서 HTML5 가이드를 무료로 또 배포해 주셔서 매우 감사합니다....꾸벅



다음 링크를 꼭!!! 한 번 보시라!!!! HTML5의 다양한 능력이 펼쳐집니다.
DB까지 커넥팅하는 군요;;;; 쿠키의 대안책도 나온듯 하구요^^;;;
나중에 함 정리해서 올려야 겠군요....ㅋㅋㅋ



아!!! 위의 링크를 보시려면 HTML5를 지원하는 브라우저에서 봐야 합니다.!!!!!



'Software Story' 카테고리의 다른 글

Windows CMD 정릴  (0) 2011.03.06
New JS APIs of HTML5  (1) 2010.07.29
HTML 5 Guide(PDF)  (0) 2010.07.21
iOS 4의 키보드 부분 Review  (2) 2010.06.25
아이폰 도난 걱정 뚝! 어플로 ‘도난방지’  (0) 2010.06.17
알툴바의 Easter Egg  (0) 2010.05.19
Posted by gofly

댓글을 달아 주세요


iOS 4가 출시한지 벌 써 3일 지났다.
iOS 4 GM(Gold Master)버젼을 받아 사용하던 나는, 여러 기능의 개선된 부분을 보았지만,
오늘 그 중에서 키보드 부분의 진화된 부분을 Review해보려고 한다.

1.키보드 스위칭

사실 이 부분은 iOS 3.1.3 일 때, 내가 보지 못한 부분이지 iOS 4에서 새로 추가 된건지는 잘 모르겠다^^
빠른 키보드 전환

빠른 키보드 전환



이 부분에 대한 언급은 한 번도 본적이 없기 때문에, 만약 이번 버젼에 새로 추가된 거라면 내가 먼저 Review하는 듯 하다^^ 기분 좋음

2. 이모티콘 키보드가 추가됨

키보드 종류중 이모티콘 키보드

키보드 종류중 이모티콘 키보드


설정 > 일반 > 키보드 > 다국어
키보드 에서 보면 이모티콘이라는 키보드를 볼 수 이가 있다.
(ㄱㄴㄷ 순으로 sorting되니 헤메지 마시고 "ㅇ" 으로 시작 키보드를 찾아 보세요)^^

키보드가 추가된 모습

키보드가 추가된 모습


자 이모티 콘이라는 키보드가 추가 된 것이 보이시죠??
 
이모티콘 키보드 화면

이모티콘 키보드 화면


그럼 글을 쓰는 곳에 가면 아래와 같이 이모티콘을 볼 수가 있답니다. 예전에는 어플받아 쓰셨죠?? 이젠 그럴 필요가 없는거죠....^^ ㅋㅋ 괜찮아 졌죠??

단, 이 이모티콘은 iPhone끼리만 호환된다는걸 기억하세요

3.문자 이모티콘

캬~이 부분 때문에 우리나라 키보드가 비교되서 조금 아쉬운데, 일본어 키보드를 추가해야 한다는 거죠;;
왜 우리나라 키보드에는 이런 문자 이모티콘을 기능 적으로 추가하지 않았는지 궁굼해지네요;;;
너무 클래식해요;;;

일본어 Ten Key키보드가 추가된 모습

일본어 Ten Key키보드가 추가된 모습


일단 일본어 키보드를 추가해야 합니다. 일본어 키보드는 두 종류가 있는데, 일반적인 키보드(Romaji)와 Ten key입니다. Ten key는 아래 보시는 바와 같이 예전 핸드폰 키패드형식의 일본어 자판입니다.
문자이모티콘 버튼

문자이모티콘 버튼



자 여기보면 "^_^" 버튼이 보이시죠?? 요고를 누르면 문자이모티콘이 나타납니다.
문자 이모티콘은 iPhone전용 이모티콘과 다르게 일반적인 핸드폰과 상호 호완이 되기 때문에,
iPhone 전용 이모티콘 보다 유용하죠^^
문자이모티콘 확장

문자이모티콘 확장



일단 "^_^" 버튼을 누르면 위와 같이 한줄로 이모티콘이 정렬되어서 나옵니다.
이것 만으로도 대단한데, 아래와 같이 완전 대박 이걸 정리한 일본어 키패드 개발자에게 찬사를 보내고 싶네요.
일본인의 기술에 기대야 하는 현실이 조금 슬프긴 하지만요.

위에 보면 "::▶" 버튼 누르면 아래와 같이 다양한 이모티콘 모음이 나옵니다!!! 만약 한국 키보드 개발자가 한국인이라면, 좀 보고 배웠음 좋겠네요;;;;

문자이모티콘

문자이모티콘


이 부분까지만해도 감사하죠^^;;;

다음은 iFunChat과 같은 어플에서 지원 했던 ♥와 같은 키를 이 번에 추가했어요 완전 좋죠^^;;;

*참 일본어 키패드는 Ten Key던 일반 키보드던 상관없이 다 기능이 있습니다. 그런데 Ten Key가 조금더 버튼 누르기도 쉽고 눈에 바로 띄어서 추천하고 싶네요^^*

4.♥와 같은 특수문자 키보드 추가

이번에도 역시 안타깝게도 일본어 키패드에 기대야만 한답니다.
마찬가지로 Ten Key에서 보여드리죠^^
특수문자키보드

특수문자키보드



자 다시 Ten Key 키보드 입니다.
위에가 기본적인 키보드인데요, "ABC"버튼 보이시죠 이 버튼을 더블 클릭합니다.
그럼 아래와 같은 키보드가 보이죠
특수문자키보드

특수문자키보드



요거 캡쳐를 못했는데, "1"버튼을 길게 누르면, ☆, ♪, →가 사방으로 보입니다.
그 중에 아무거나 하나를 선택하게 되면 아래와 같이 특수문자가 한줄로 간편하게 나타납니다.
문자이모티콘이랑 같죠?? 우리도 좀 이런거 해줬음;;;;

특수문자키보드

특수문자키보드



마찬가지로 "::▶"버튼을 누르면
아래와 같이 여러가지 특수키가 나옵니다. 이것 역시 일반핸드폰과 상호 호완되는 것으로 알고 있습니다.

예전에는 iFunChat어플을 깔아서 복사해서 붙여 넣기 하던 것이 훨 씬 수월해 졌죠???

특수문자키보드 확장

특수문자키보드 확장



자~~아래와 같이 ♥가 입력된 것이 보이죠?? ㅎㅎㅎㅎㅎ

특수문자 선택한 화면

특수문자 선택한 화면



5.Bug Report

버그도 리뷰에 포함 시켜야 하겠죠?? 두가지가 있는데, 그 첫 번째는 화면문제인지, 키보드 문제인지 아직 헷갈리는 부분입니다. 제가 돈만있음 개발툴 사서 해보면서 테스트 해볼 수 있을 텐데.....일년에 $990을 감당하기에 제 현실이 너무 초라하네요;;;;

아래와 같습니다. 트위터와 같은 SNS에서 글을 쓰면 아래와 같이 2줄이상이 되면 글을 계속 쓰고 있는데, 화면에 보이지 않습니다. 커서(Cursor)는 계속 움직이는데, 글은 안보입니다.

버그1

버그1




이것에 글을 보이게 하려면, 길게 Tab하면 글이 보입니다. 화면문제인지, 키보드 문제인지 아시는 분은 이야기좀, 이거 어떻게 리포트할 수 있는지 궁굼하네요^^;;;

그 다음은 "TAB"버튼의 활성화 문제입니다.
아래 그림을 보시죠 "TAB"키는 활성화 되어 있는데, 된소리 문자(ㄲ,ㄸ,ㅃ등)는 안보이죠??

버그2

버그2




이 문제는 특수키 버튼을 누르면 활성화 될 때도 있고, 키보드 변환 할 때도 증세가 보이는거 같습니다.
이건 확실히 키보드 어플의 무네인듯 한데, 애플에 어떻게 리포트 할 지 알려주실분!!!


마무리

지금까지 iOS4의 키보드 부분에 대한 Review였습니다.

앞으로 조금더 좋은 좋은 정보로 계속해서 Bloging 했음 좋겠네요^^

'Software Story' 카테고리의 다른 글

Windows CMD 정릴  (0) 2011.03.06
New JS APIs of HTML5  (1) 2010.07.29
HTML 5 Guide(PDF)  (0) 2010.07.21
iOS 4의 키보드 부분 Review  (2) 2010.06.25
아이폰 도난 걱정 뚝! 어플로 ‘도난방지’  (0) 2010.06.17
알툴바의 Easter Egg  (0) 2010.05.19
Posted by gofly

댓글을 달아 주세요

  1. 아이뽄 2010.12.12 08:48  댓글주소  수정/삭제  댓글쓰기

    글올리시느라 수고하셨어요.이모티콘 사용정보 감사합니다.^^

아이폰 도난 걱정 뚝! 어플로 ‘도난방지’
정윤희 기자 yuni@zdnet.co.kr 2010.06.08 / PM 00:03
[지디넷코리아]최근 아이폰 이용자가 70만 명이 넘어서면서 도난, 분실 등이 이슈로 떠올랐다. 가격도 가격이지만 아이폰을 비롯한 각종 스마트폰이 업무, 모바일 뱅킹, 생활 등 다양한 곳에 활용되면서 고도로 정보가 집적된 기기가 돼버렸기 때문이다.

 

실제로 스마트폰이나 고가의 기기는 쉽게 범죄의 타깃이 되기도 하는 만큼 아이폰 사용자들은 도난 방지에 안간힘이다. 각종 아이폰 관련 카페 등에는 도난 및 분실 신고가 올라오는가 하면 다양한 도난 방지 방법에 대한 노하우를 공유하기도 한다. 이런 가운데 최근 아이폰 사용자들은 따로 어플리케이션(이하 어플)을 다운로드 받아 도난 방지에 힘쓰는 모양새다.

 

8일 관련 업계에 따르면 앱스토어에서는 이러한 사용자들의 욕구에 맞춘 다양한 도난 방지 어플리케이션이 출시돼 눈길을 끈다.

 

가장 눈에 띄는 어플은 대학생 개발자 홍기종씨(25, 아주대학교)가 등록한 ‘진돗개’다. 지난달 28일 국내 앱스토어에 등록된 ‘진돗개’는 내장 센서를 이용해 생활 충격과 도난 시도를 스스로 판단하는 도난 방지 어플이다.

 

▲ 대학생 개발자 홍기종씨가 개발한 `진돗개`

‘진돗개’는 도난 시도가 감지되면 설정에 따라 30초간 도난 알림 경고음을 발생시키는 ‘진돗개 짖기’와 자동으로 긴급 번호에 통화 시도를 하는 ‘주인님께 신고하기’가 실행된다. 이용자는 도난 시 연락할 긴급 전화번호를 설정할 수 있고 경보음 볼륨도 0에서 10까지 마음대로 지정하는 것이 가능하다. 홈 버튼과 종료버튼에도 꺼지지 않는다.

 

홍씨는 “기존 어플들은 하루가 지난 다음에 위치가 추적되거나 소소한 생활 충격에도 알람이 울리는 등 불편함이 많았다”며 “‘진돗개’는 다양한 상황에서의 충격량을 일일이 분석한 후 프로그램화 해 일상생활에서의 실용성을 높였다”고 말했다.

 

아울러 “해외 앱스토어에 출시되기도 전부터 미국, 홍콩, 영국 등에서 ‘진돗개’를 구매하는 등 해외에서도 높은 관심을 보였다”고 덧붙였다. 홍씨는 실제로 다양한 도난 상황을 시연한 동영상을 아이폰 관련 카페 및 커뮤니티에 올려 누리꾼들의 눈길을 끌기도 했다.

 

국내 앱스토어에서 2.99달러에 판매되던 ‘진돗개’는 8일 현재 북미 앱스토어(북미 명 ‘재즈 독’) 출시 기념으로 0.99달러에 판매되고 있다. 아울러 일본 앱스토어에는 ‘락 독(Lock Dog)’이라는 이름으로 서비스 준비 중이다.
▲ 자신의 아이폰 위치를 추적해 주는 `아이하운드`

‘아이하운드(iHound)’는 지도상에서 자신의 아이폰 위치를 알려주는 어플이다. 어플을 다운로드 받아 간단하게 회원 가입만 하면 바로 사용할 수 있다.

 

아이폰을 도난 혹은 분실했을 때 이용자는 ‘아이하운드’ 홈페이지를 통해 자신의 아이폰에 메시지를 보내게 된다. 아이폰에 도착한 메시지는 상당히 시끄러운 소리를 내게 되는데 이를 끄기 위해서는 어쩔 수 없이 잠금 버튼을 밀어야 한다. 바로 이 때 자동으로 ‘아이하운드’가 실행되는 방식.

 

▲ 다양한 모드를 지정할 수 있는 `디프 부스터`

‘디프 부스터(Thief Buster)’는 비밀 번호를 지정한 후 터치 모드, 포켓 모드, 가방 모드 등 상황에 따라 여러 가지로 사용할 수 있다. 도난 상황 발생 시에는 자동으로 최대 음량의 알람이 울리게 되며 홈 버튼은 어플을 재실행 시키게 된다.

 

이밖에 향후 스텔스 모드가 탑재된 GPS 위치정보도 추가될 예정이다. ‘디프 부스터’는 영어와 스페인어가 지원되며 0.99달러에 판매 중이다.

 

아이폰을 사용하고 있는 한 누리꾼은 “아이폰에 중요한 정보를 많이 넣고 다니다보니 항상 도난이나 분실에 신경을 쓰게 된다”며 “도난 방지 어플 하나 정도는 필수로 깔아놓고 다니고 있다”고 말했다.

'Software Story' 카테고리의 다른 글

Windows CMD 정릴  (0) 2011.03.06
New JS APIs of HTML5  (1) 2010.07.29
HTML 5 Guide(PDF)  (0) 2010.07.21
iOS 4의 키보드 부분 Review  (2) 2010.06.25
아이폰 도난 걱정 뚝! 어플로 ‘도난방지’  (0) 2010.06.17
알툴바의 Easter Egg  (0) 2010.05.19
Posted by gofly

댓글을 달아 주세요

Easter Egg라 함은 프로그램의 숨은 기능으로

 

부활절 달걀을 장난치던 풍습 그러니까 삶은 달걀안에 삶지 않은 달걀을 숨겨놔

그것을 받은 사람이 봉변당하게 하는 풍습에서 유래된 말이다....

 

오늘은 알툴바의 Easter Egg를 소개 하려고 한다....간단하다

 

알툴바 기능중에 마우스액션이라는 기능이 있는데 오른쪽 클릭을 하고 Drag를 하면 색이 칠해지면서 표시가 되는데

 

이것을 끊기 않고 아래와 같이 화면이 꽉차도록 계속 칠한다

 

마우스 액션으로 화면칠하기

알툴바 마우스 액션으로 화면을 가득 칠한다.

 

이렇게 계속 칠하면(꾀 많이 칠해야 함) 다음과 같은 웃긴 시가 나타난다....

 

 

"도전은 무모하고, 창조는 모호하지만"

 

크크크 내가 오른쪽 클릭하고 마우스액션으로 그림을 그렸던게 도전이란다....그래서 그 도전은 무모하단다.....

 

그래도 끝내 격렬해주니 뭐 고맙다...흐흐흐흐흐....

 

이상 알툴바 Easter 에그 였다...^^

'Software Story' 카테고리의 다른 글

Windows CMD 정릴  (0) 2011.03.06
New JS APIs of HTML5  (1) 2010.07.29
HTML 5 Guide(PDF)  (0) 2010.07.21
iOS 4의 키보드 부분 Review  (2) 2010.06.25
아이폰 도난 걱정 뚝! 어플로 ‘도난방지’  (0) 2010.06.17
알툴바의 Easter Egg  (0) 2010.05.19
Posted by gofly

댓글을 달아 주세요