Bash POSIX Mode on window 10

0

I tried to use split command on window git bash shell. script is as below

test.sh
split -a 1 -p 'temp' file1.sql data-  && mv data-a data1.sql && mv data2.sql

it is failed with error:

split: unknown option -- p
Try 'split --help' for more information.

I read about -p for Bash POSIX Mode and see like it should work on Cygwin on window. I installed it and tried with it. It failed also with same error. It support on linux and mac. Is anybody idea what I am doing wrong

takrbuiam

Posted 2017-10-30T05:59:43.400

Reputation: 101

Answers

0

GNU split does not support -p. If you need to split on a pattern then use csplit instead.

Ignacio Vazquez-Abrams

Posted 2017-10-30T05:59:43.400

Reputation: 100 516

ohk I see. Thanks so csplit support mv pattern? – takrbuiam – 2017-10-30T06:48:30.763