File:  [parser3project] / parser3 / tests / 370.html
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Mon Feb 13 17:15:56 2017 UTC (9 years, 4 months ago) by moko
Branches: MAIN
CVS tags: release_3_5_1, release_3_5_0, release_3_4_6, release_3_4_5, HEAD
cat-windows.sh support added

@main[]

$script[./cat^os[-windows].sh]

$f[^file::load[binary;370.dat]]

$fb[^file::exec[binary;$script; $.stdin[$f] ;stdin]]

binary with first 0x00 byte:^json:string[$fb; $.file[base64] ]

$f[^file::create[text;sample.txt;АБВ]]

$ft[^file::exec[$script; $.stdin[$f] $.charset[windows-1251] ;stdin]]
text stdin (input converted, output converted back): $ft.text

$f[^file::create[binary;sample.txt;АБВ]]

$ft[^file::exec[$script; $.stdin[$f] $.charset[windows-1251] ;stdin]]
binary stdin (input not converted, output converted win->utf): $ft.text

$ft[^file::exec[binary;$script; $.stdin[$f] $.charset[windows-1251] ;stdin]]
binary exec + binary stdin (input not converted, output not converted): $ft.text

E-mail: