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-i686.exe sfk and chmod +x sfk then ./sfk - Linux: type mv sfk-linux.exe sfk and chmod +x sfk then ./sfk OS X and Linux syntax may differ, check the help within the tool.
sfk echo [-spat] string [string2] [string3] [...] prints the supplied string to terminal which may contain color patterns: [Red],[Green],[Blue],[Yellow],[Cyan],[Magenta] (bright) [red],[green],[blue],[yellow],[cyan],[magenta] (dark) print the following text in the selected color. [def] switch back to default color. [[ print the '[' character, no not interpret the following word. ]] print the ']' character, do not interpret it. further pattern support: -spat activates slash patterns: \t=TAB \q=" \r=CR \n=LF \xnn = any code with hex value nn. -literal or -lit disables everything, even color patterns. set this always if you need to process filenames in batch files, using echo to feed a command chain: sfk echo -lit %1 +filter -rep _/_\_ ... options -noline stay in the same line, print no linefeed. if your string ends with \r, -noline is assumed. -noblank if multiple strings are given, do not insert blanks between them. -lines print every given string as a single line. command chaining notes by default, echo produces only text data, not filenames. to send this to file commands use +texttofilenames or +ttf. echo -lines may produce filename lists directly. quoted multi line parameters are supported in scripts using auto indent. type "sfk script" for details. see also: sfk help colors web reference http://stahlworks.com/sfk-echo examples sfk echo "[Red]error:[def] missing filename." prints "error: missing filename." onto terminal. sfk echo [Cyan]NOTE:[def] type the word [[red]] with brakets! prints "NOTE: type the word [red] with brakets!" onto terminal. sfk echo "[Green]mytext contains:[def]" +then filter mytext.txt +then forces echo not to pass its text to filter, but to print it immediately. filter then prints the content of mytext. sfk echo -nocconv -spat "\xc9\xcd\xbb\n\xba \xba\n\xc8\xcd\xbc\n" print a graphical box using extended dos characters. more infos under sfk ascii -dos and sfk help opt sfk echo -spat "foo\nand\nbar" +tofile mydir\test1.txt create a small text file with three text lines sfk echo -lines 100 101 102 +perline "web .$text/status.xml" load page /status.xml from three local ip's .100, .101, .102 sfk color colorname switches the text color of terminal (command line). supported color names are: white grey red green blue yellow cyan magenta black
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.