|
How to do things AI Noob vs. Pro
List biggest files Free Open Source: Swiss File Knifea command line
Depeche View
command line
free external tools,
cpp sources
articles |
sfk ... +perline "command #text"
for every chain text line run sfk commands(s)
like a sub function, passing the text as parameters.
options
-yes really execute. default is just to simulate
what would be done.
-setvar x put whole line text into variable x,
for easy use in a call without parameters.
-nohead does not display the [simulating:] info text.
-stoprc=n stop on return code >= n instead of default 9.
-nostop do not stop on errors regardless of rc.
command string format
each word, separated by whitespace, is a parameter.
to fill in the current chain text line use $text or #text.
perline uses a strict command format by default.
to insert characters $ or # as is type $$ or ##
with option -spat, slashpatterns like \t \q \xnn are supported.
to use multiple words as one parameter use -spat and \q ... \q
quoted multi line parameters are supported in scripts
using parm trim. type "sfk script" for details.
recursion limit
if the called function calls another function by call
or perline this should not be nested too often,
otherwise sfk may crash.
see also
sfk run for the full command string format
sfk stacksize test available stack size
examples
sfk echo -lines 100 101 102
+perline -spat "web -nodump \q.$text/xml/restart.xml\q"
on local ip's .100 .101 and .102
call a web command /xml/restart.xml. [17]
sfk sel mydir .jpg +perline -spat "echo <img src=\q#ufile\q
width=\q400\q> +tofile -append print.html"
create a file print.html containing all .jpg files of
folder mydir, shown with 400 pixels width. [28]
sfk load in.txt +perline -setvar l "call doline" -yes +end
within a script: on every line set variable l with
the full line text, then call label doline.
sfk load foldernames.txt +perline "sfk list #qtext" -yes
load a file with folder names and list contained files.
qtext adds quotes around the names for safety.
sfk ... +perline "command #text"
for every chain text line run sfk
commands(s) like a sub function, passing
the text as parameters.
options
-yes really execute. default is
just to simulate what would
be done.
-setvar x put whole line text into
variable x, for easy use in
a call without parameters.
-nohead does not display the
[simulating:] info text.
-stoprc=n stop on return code >= n
instead of default 9.
-nostop do not stop on errors
regardless of rc.
command string format
each word, separated by whitespace, is a
parameter. to fill in the current chain
text line use $text or #text.
perline uses a strict command format by
default. to insert characters $ or # as
is type $$ or ## with option -spat,
slashpatterns like \t \q \xnn are
supported. to use multiple words as one
parameter use -spat and \q ... \q
quoted multi line parameters are supported
in scripts
using parm trim. type "sfk script" for
details.
recursion limit
if the called function calls another
function by call or perline this should
not be nested too often, otherwise sfk
may crash.
see also
sfk run for the full command
string format
sfk stacksize test available stack size
examples
sfk echo -lines 100 101 102
+perline -spat "web -nodump \
q.$text/xml/restart.xml\q"
on local ip's .100 .101 and .102
call a web command /xml/restart.xml.
[17]
sfk sel mydir .jpg +perline -spat "echo
<img src=\q#ufile\
q
width=\q400\q> +tofile -append
print.html"
create a file print.html containing
all .jpg files of folder mydir, shown
with 400 pixels width. [28]
sfk load in.txt +perline -setvar l "call
doline" -yes
+end
within a script: on every line set
variable l with
the full line text, then call label
doline.
sfk load foldernames.txt +perline "sfk
list #qtext" -yes
load a file with folder names and list
contained files. qtext adds quotes
around the names for safety.
you are viewing this page in mobile portrait mode with a limited layout. turn your device right, use a desktop browser or buy the sfk e-book for improved reading. 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).
|


