Wednesday, January 27, 2010

Krickey, spammers!

Sorry about the comment spam on here, I didn't realize moderation was off. I'll fix that right now.

-e

Backticks for windows. (almost)

In Linux, or more specifically in the sh and bash shells, backticks " ` " execute a command and insert the results into a command. I found a great trick to do almost the same thing over at PcReview

This snippet will save the hostname of a PC to an environment variable.


for /f "delims=" %%A in ('hostname') do set hostname=%%A
echo %hostname%


It loops over the output and keeps setting the variable. Cool.

Thursday, January 14, 2010

Setting IP addresses from the command line

netsh interface ip set address name="Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1 1