To the Top
File:  root - diary - 2008 - 2008-12 - 2008-12-10_19.20PM.html
Tags: 计算机, Computing, | English | Home Page | Category: Computing | 24700 Views, 44191 Search Bots | 350 Words

Subscribe to Feed Burner | Browse | Archive

%yes
y
y
y (Ctrl+C)
%

yes .... now i will talk about something about "yes" utility...
in linux,, usually located at /usr/bin/, there is a file called "yes"
it utterly does nothing but continues output of "y"

the size of this file is around 19kb (in OpenSUSE 11)
i recommend you try this command... hehe... don't login as root,,

yes | rm -i *

now,,, i'll talk about making "yes" on windows ....
here is the one purely done in "debug"
Yes >

this yes quits when you press "Q" or "q"
or you can write one by a simply loop

loop:
mov dx, offset yes
mov ah, 9
int 21h
jmp loop
yes db "yes", 0d, 0a, "$"


or in batch file

@echo off
REM A yes utility on windows
REM Zhihua Lai, 07/Dec/2008 5:05am
REM Free to use, just for fun!

:yes
echo yes
goto yes


or if you write a keypressed.com which returns the key to command line...

@echo off
REM A yes utility in batch file with keypressed.com
REM Written by Zhihua Lai, 10-Dec-2008, 2:49
REM Just For Fun!

:yes
echo yes
keypressed
set key=%errorlevel%
if %key% EQU 81 goto eof
if %key% EQU 113 goto eof
goto yes

:eof
set key=


now i am attaching binary files... just for fun!

yes.com (37 Bytes)
yes15b.com (15 Bytes)
keypressed.com (19 Bytes)
You see, they are pretty small.
Tags: 计算机, Computing, | English | Home Page | Category: Computing | 24700 Views, 44191 Search Bots | 350 Words Subscribe to Feed Burner

Related Articles

  1. How to Play WAV music under DOS?
  2. Patterns for breaking down questions you haven
  3. Skip the readings, focus on problems. And use all the hints!
  4. Detect Linked List Cycle
  5. Daily Interview Problem: Get all Values at a Certain Height in a Binary Tree
  6. [Daily Problem] Add two numbers as a linked list
  7. Reverse a Directed Graph
  8. Algorithm Interview: Permutations of numbers
  9. Two-Sum
  10. Daily Interview Problem: Contiguous Subarray with Maximum Sum

Comments (0)

Your Email (Domain Part Not Exposed):

Your Comments:

Privately By Mail Colors More Smileys S x y @

Verification (Click Image 2 Refresh):

    Be the first one to comment this page !


Page Edited: May 11 2024 14:36:49 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">