Swiss File Knife
a command line
free external tools,
- download the free Swiss File Knife Base from Sourceforge. - open the Windows CMD command line, Mac OS X Terminal or Linux shell. - OS X : type mv sfk-mac-64.exe sfk and chmod +x sfk then ./sfk - Linux: type mv sfk-linux-64.exe sfk and chmod +x sfk then ./sfk OS X and Linux syntax may differ, check the help within the tool.
sfk ip [shortip] [-help], sfk ownips [-help] list the current machines ip address(es), or expand a short ip for use in further commands. a short ip can be given like 100, .100, .2.100 options -first show just the first ip of all ips which are not localhost. default since sfk 22.214.171.124 is to show all ip's, if not filtered by environment variables (see below) -all show all ip's, ignoring any given environment variable environment variables multiple network interfaces will display multiple ip's. to filter or predefine the output of 'sfk ip' you can use: set SFK_OWN_NET=192.168.1 to define your preferred subnet. e.g. if your computer has ip's 192.168.56.1 192.168.1.100 then 'sfk ip' will select the 2nd address. set SFK_OWN_IP=192.168.1.100 to define your machine's IP manually, for calls to 'sfk ip' within batch files. chaining support output chaining is supported. web reference http://stahlworks.com/sfk-ip examples sfk ip list own machine's list of ip's, possibly filtered by environment variables. sfk ip -all list own machine's list of ip's ignoring any environment variable. sfk ip 100 +run "putty user@#text" expand short ip to 192.168.1.100 if own machine is within a subnet 192.168.1
sfk is a free open-source tool, running instantly without installation efforts. no DLL's,
no registry changes - just get sfk.exe from the zip package and use it (binaries for
windows, linux and mac are included).
read more about all sfk functions here.