For example: I have a file sample.txt consisting of the sole line:
The Unix command
#cut -c 1,13-15,26 sample.txt
produces the output:
How can I achieve this output with sfk (filter)?
This function is not available as a single command. A workaround could look like:
sfk partcopy sample.txt 0 1 output.txt -yes
sfk partcopy sample.txt -fromto 12 15 output.txt 1 -yes
sfk partcopy sample.txt 25 1 output.txt 4 -yes
Thanks. After a week of trying I got this oneliner working:
c:\>for /f %i in (sample.txt) do @(set a=%i & echo %a:~0,1%%a:~12,3%%a:~25,1%)
Erm . . Not sure that line would work, anyway . .
I think all your %a…% variable mastication will substitute before setting a=%i.
Have I missed something?
thanks for the correction!
will only work if the command interpreter was invoked with
Log in to post a comment.